Halvisch
Lurker
I've been trying for two days now, to replace the native ConnectionSerivce, with no success. Here's what I've done, as stated in the documentation.
Thanks.
- I've created a class which extends ConnectionService.
- I've registered my implementation in the AndroidManifest.xml:
<service android:name="se.example.myapplication.MyConnectionService"
android:label="@String/MyConnectionService"
android
ermission="android.permission.BIND_TELECOM_CONNECTION_SERVICE">
<intent-filter>
<action android:name="android.telecom.ConnectionService" />
</intent-filter>
</service>
- I've registered a new PhoneAccount:
ComponentName componentName = new ComponentName("se.example.myapplication", "se.example.myapplication.MyConnectionService");
PhoneAccountHandle phoneAccountHandle = new PhoneAccountHandle(componentName, "1234");
PhoneAccount phoneAccount = PhoneAccount.builder(phoneAccountHandle, "Adminn").build();
telecomManager.registerPhoneAccount(phoneAccount);
Thanks.