I've been googeling for two days straight now, but I can't seem to find a 
way to implement my own custom ConnectionService into my app.
The documentation 
<http://developer.android.com/reference/android/telecom/ConnectionService.html> 
states 
that I have to two things for the telecom to bind itself to my 
ConnectionService:

   1. Register the service in my AndroidManifest.xml
   2. Register a new PhoneAccount, which point toward my implementation of 
   the ConnectionService.

Alright, let's have a look at my AndroidManifest.xml. Here's what I've 
added:

<service android:name="se.example.myapplication.MyConnectionService"
    android:label="@string/MyConnectionService"
    android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE">
    <intent-filter>
        <action android:name="android.telecom.ConnectionService" />
    </intent-filter>
</service>


Here's my code for registering a new PhoneAccount.

TelecomManager telecomManager = (TelecomManager) 
getSystemService(Context.TELECOM_SERVICE);
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);


Still nothing seem to happen. My ConnectionService isn't used and there's no 
where I can select the newly created PhoneAccount.

Any ideas, please?

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/11e99640-e5be-4e0d-a638-eb4f51e4dee2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to