1

自我管理PhoneAccount的注册是这样的:

PhoneAccount phoneAccount = PhoneAccount.builder(phoneAccountHandle, name)
                .addSupportedUriScheme(CUSTOM_URI_SCHEME)
                .setCapabilities(
                        PhoneAccount.CAPABILITY_SELF_MANAGED |
                        PhoneAccount.CAPABILITY_VIDEO_CALLING |
                        PhoneAccount.CAPABILITY_SUPPORTS_VIDEO_CALLING)
                .setShortDescription(name)
                .build();
telecomManager.registerPhoneAccount(phoneAccount);

使用时.placeCall()

Bundle extra = new Bundle();
extra.putParcelable(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE, phoneAccountHandle);
telecomManager.placeCall(Uri.parse(CUSTOM_URI_SCHEME + ":" + "[call address] param"), extra);

ConnectionService触发,并弹出以下警报消息:

未发送呼叫,未输入有效号码。


另外,我测试过不使用自定义URI,使用“tel:”方案,发现手机必须有SIM卡,才能触发ConnectionService,这种行为与自我管理的文档不同,任何人遇到并能够解决上述任一情况?

4

0 回答 0