我正在尝试开始视频通话,但每次都收到此错误
E/AndroidRuntime(668): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.android.phone.videocall dat=tel:xxx-xxx-xxxx (has extras) }
E/AndroidRuntime(668): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1409)
E/AndroidRuntime(668): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1379)
E/AndroidRuntime(668): at android.app.Activity.startActivityForResult(Activity.java:2827)
E/AndroidRuntime(668): at android.app.Activity.startActivity(Activity.java:2933)
这是我的代码:
Intent callIntent = new Intent("com.android.phone.videocall");
callIntent.putExtra("videocall", true);
callIntent.setData(Uri.parse("tel:" + prefs.getString("videonumber", "")));
startActivity(callIntent);
在我的清单中,我得到了<uses-permission android:name="android.permission.CALL_PHONE"/>
许可。我以为这就是你所需要的,但也许我错了。我videonumber
的格式是 1-xxx-xxx-xxxx。任何帮助将不胜感激。