Android class ConnectionService -


can give example how implement abstract class- connectionservice.my idea use telecommanager make outgoing call.

https://developer.android.com/reference/android/telecom/connectionservice.html#service_interface

telecommanager telecommanager = (telecommanager)this.getsystemservice(context.telecom_service);         phoneaccounthandle accounthandle=telecommanager.getsimcallmanager();         phoneaccount account=telecommanager.getphoneaccount(accounthandle);         telecommanager.registerphoneaccount(account);          charsequence label=account.getlabel();         connectionrequest request = null;          connection connection= service.oncreateoutgoingconnection(accounthandle,request); 

now need know given in request feild , connection service how implement before it..

it's purpose not other apps place calls. supported method doing through intent.action_call stated in other answer.

there api on telecommanager place call, however, no different sending intent directly. more information telecommanager.placecall: http://developer.android.com/reference/android/telecom/telecommanager.html#placecall

about connectionservice:

the main purpose of connectionservice api include third party voip calls system dialer such cellular call , third-party voip call can live side side , user can switch between them. voip apps implement api benefit having calls treated traditional cellular calls including having them show in built-in system dialer/in-call ui, call log, android wear support , android auto support.

if third party voip app wanted calls live side-by-side traditional cellular calls, would:

1) create implementation of connectionservice

2) declare service within androidmanifest.xml file

3) register phoneaccount connectionservice component name

more information: http://developer.android.com/reference/android/telecom/connectionservice.html

the user able turn on particular phone account through dialer settings , connection service option user place , receive phone calls through own voip service.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -