我正在使用系统管理的ConnectionService构建一个带有VoIP的应用程序。注册PhoneAccount时,用户需要在安卓系统设置(或拨号应用程序设置?)中手动启用PhoneAccount。如果未启用,TelecomManager将不会路由VoIP呼叫。
如何使用意图将用户发送到此“呼叫帐户”设置屏幕?我不希望用户必须自己找到此设置。
发布于 2018-08-17 18:24:59
经过一番搜索,我在一个谷歌群组中找到了这个:
if (Build.MANUFACTURER.equalsIgnoreCase("Samsung")) {
Intent intent = new Intent();
intent.setComponent(new ComponentName("com.android.server.telecom",
"com.android.server.telecom.settings.EnableAccountPreferenceActivity"));
startActivity(intent);
} else {
startActivity(new Intent(TelecomManager.ACTION_CHANGE_PHONE_ACCOUNTS));
}https://groups.google.com/forum/#!topic/android-contrib/C7qbnnAGzsk
https://stackoverflow.com/questions/51893347
复制相似问题