2

i want to implement this for adding incoming call and different operations on an ongoing call like holding rejecting etc.

I have already viewed and implemeted the following but got

FATAL EXCEPTION:java.lang.SecurityException: This PhoneAccountHandle is not enabled for this user!

Android: Implement a custom ConnectionService which uses built-in telephony stack

piet.t
  • 11,718
  • 21
  • 43
  • 52
waqas
  • 59
  • 4
  • can you please provide more information? and some code examples as well please? – Felix Sep 07 '17 at 13:10
  • As i am not getting the right way to use this System managed Connection Service: https://developer.android.com/reference/android/telecom/ConnectionService.html Secondly how this can be enabled System managed ConnectionServices must be enabled by the user in the phone app settings – waqas Sep 07 '17 at 13:21
  • Felix Have you got any clue to this problem ?? – waqas Sep 07 '17 at 13:34

1 Answers1

0

I had the same problem. You can not enable your PhoneAccount programatically. Please, check my post: Enable phoneAcco

Jose Riballo
  • 308
  • 2
  • 12
  • Where exactly should I put that verification when Samsung? – Pablo Dec 26 '17 at 19:50
  • Sorry, I am not sure what you mean. The link I posted shows a piece of code that is used for request the user to enable your application phone account. The problem is that Samsung doesn't recognize the intent `TelecomManager.ACTION_CHANGE_PHONE_ACCOUNTS`, so you must use a special intent. Then on an activity, you can call `startActivity(yourIntent)` to show the _Manage PhoneAccounts_ settings where users can enable or disable created phoneAccounts – Jose Riballo Jan 09 '18 at 13:37