我已经在我的即时应用中实现了动态链接,当点击链接打开即时应用程序但是在方法getDynamicLink(意图)中它显示以下错误:
com.google.android.gms.common.api.ApiException: 17: API: DynamicLinks.API is not available on this device.
at com.google.android.gms.common.internal.zzb.zzz(Unknown Source)
at com.google.android.gms.common.api.internal.zzg.zzu(Unknown Source)
at com.google.android.gms.common.api.internal.zze.zzt(Unknown Source)
at com.google.android.gms.common.api.internal.zzbr.zzx(Unknown Source)
at com.google.android.gms.common.api.internal.zzbr.onConnectionFailed(Unknown Source)
at com.google.android.gms.common.internal.zzad.onConnectionFailed(Unknown Source)
at com.google.android.gms.common.internal.zzn.zzj(Unknown Source)
at com.google.android.gms.common.internal.zze.zzv(Unknown Source)
at com.google.android.gms.common.internal.zzi.zzakh(Unknown Source)
at com.google.android.gms.common.internal.zzh.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:234)
at android.os.HandlerThread.run(HandlerThread.java:61)
我班上的代码如下:
FirebaseDynamicLinks.getInstance()
.getDynamicLink(intent)
.addOnSuccessListener(this)
{
pendingDynamicLinkData ->
// Get deep link from result (may be null if no link is found)
var deepLink: Uri? = null
if (pendingDynamicLinkData != null) {
deepLink = pendingDynamicLinkData.link
}
showAlertDialog(deepLink.toString())
// Handle the deep link. For example, open the linked
// content, or apply promotional credit to the user's
// account.
// ...
// ...
}
.addOnFailureListener(this) { e -> Log.w("FailureListener", "getDynamicLink:onFailure", e) }
请帮帮我。