在Android 11、10及更低版本上,google meet应用程序不处理其解析活动com.google.android.libraries.communications.conference.ui.intents.AssistantNewUrlHandlerActivity
中定义的运行时权限
这可以通过以下代码轻松复制:
private fun openGoogleMeetUrl() {
val url = "https://meet.google.com/new"
val webpage: Uri = Uri.parse(url)
val intent = Intent(Intent.ACTION_VIEW, webpage)
val resolveActivity = intent.resolveActivity(packageManager)
if (resolveActivity != null) {
startActivity(intent)
} else {
Log.w("DEBUG_TAG", "Unable to find activity to launch.")
}
}
希望应用程序团队中有人已订阅标签,以便收到通知。如果有人知道这次崩溃的解决方法,请告诉我。感谢
其他详细信息:https://support.google.com/meet/thread/187185694
崩溃日志:
8199-8199/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.chromecustomtab, PID: 8199
java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.VIEW dat=https://meet.google.com/... cmp=com.google.android.apps.meetings/com.google.android.libraries.communications.conference.ui.intents.AssistantNewUrlHandlerActivity } from ProcessRecord{ea9c15f 8199:com.example.chromecustomtab/u0a152} (pid=8199, uid=10152) requires android.permission.CALL_PHONE
at android.os.Parcel.createException(Parcel.java:2071)
at android.os.Parcel.readException(Parcel.java:2039)
at android.os.Parcel.readException(Parcel.java:1987)
at android.app.IActivityTaskManager$Stub$Proxy.startActivity(IActivityTaskManager.java:3851)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1705)
at android.app.Activity.startActivityForResult(Activity.java:5192)
at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:574)
at android.app.Activity.startActivityForResult(Activity.java:5150)
at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:560)
at android.app.Activity.startActivity(Activity.java:5521)
at android.app.Activity.startActivity(Activity.java:5489)
at com.example.chromecustomtab.MainActivity.openWithUrlIntent(MainActivity.kt:40)
at com.example.chromecustomtab.MainActivity.onCreate$lambda-0(MainActivity.kt:22)
at com.example.chromecustomtab.MainActivity.$r8$lambda$z3Mks0G0-clLlQbj_fjGy_IFcVM(Unknown Source:0)
at com.example.chromecustomtab.MainActivity$$ExternalSyntheticLambda0.onClick(Unknown Source:2)
at android.view.View.performClick(View.java:7125)
at com.google.android.material.button.MaterialButton.performClick(MaterialButton.java:1119)
at android.view.View.performClickInternal(View.java:7102)
at android.view.View.access$3500(View.java:801)
at android.view.View$PerformClick.run(View.java:27336)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.wm.ActivityStackSupervisor.checkStartAnyActivityPermission(ActivityStackSupervisor.java:1043)
at com.android.server.wm.ActivityStarter.startActivity(ActivityStarter.java:760)
at com.android.server.wm.ActivityStarter.startActivity(ActivityStarter.java:583)
at com.android.server.wm.ActivityStarter.startActivityMayWait(ActivityStarter.java:1288)
at com.android.server.wm.ActivityStarter.execute(ActivityStarter.java:514)
由于导致应用程序崩溃的运行时异常来自第三方应用程序。没什么可做的。
目前的解决方法是处理以下问题:
try {
openGoogleMeetUrl()
} catch (e: Exception) {
Toast.makeText(this, "Unable to open url", Toast.LENGTH_LONG).show()
}