我正在接收深链接url形式的单个密钥:https://example.in/?meetingCode=usertest?meetingToken%3DtZSI6InN5c3Rl7RfdQ4JEbnMkBfNmanH6VrRC4FzcFgOJEU2BmJEBAzo
我想从中检索MeetingCode和MeetingToken字符串值。当前,它正在提取MeetingCode或MeetingToken的值。如何提取两个字符串?
deepLink?.getQueryParameter("meetingCode")deeplink?.queryParameter("meetingToken)
这是代码:
private fun handleDynamicLink() {
Firebase.dynamicLinks
.getDynamicLink(intent)
.addOnSuccessListener { pendingDynamicLinkData ->
val deepLink: Uri?
if (pendingDynamicLinkData != null) {
deepLink = pendingDynamicLinkData.link
deepLink?.getQueryParameter("meetingCode")?.let { joinMeeting(it) }
}
}
.addOnFailureListener { _ ->
toast(getString(R.string.main_error_fetch_dynamic_link))
}
}
请帮助我实现它。谢谢