android - Intent.ACTION_CALL terminates calls immediately on some devices -


my app generates calls follows (intent sent service):

intent intent = new intent();     intent.setaction(intent.action_call);     intent.setdata(uri.parse("tel:" + getphonenumber());     intent.addflags(intent.flag_activity_new_task | intent.flag_activity_multiple_task);     getcontext().startactivity(intent); 

it has permissions:

<uses-permission android:name="android.permission.call_phone"/> 

it works fine on devices, on (samsung s6, lg - lollipop) causes call terminate (not always, on ~30-40% of calls).

logs show telecom manager decided mysteriously disconnect call:

09-30 09:23:01.731    3565-3565/? i/telecom﹕ : delayed disconnection of call: [929220936, connecting, null, ***-***-****, 0, childs(0), has_parent(false), [[capabilities:]] 

any idea?

to open dialer app (the user has press call button inside dialer app; no additional permissions needed) use:

string number = "9999999999"; uri call = uri.parse("tel:" + number);              intent surf = new intent(intent.action_dial, call);  startactivity(surf); 

to open dialer app , call automatically (needs android.permission.call_phone) use:

 string number = "9999999999";     uri call = uri.parse("tel:" + number);                  intent surf = new intent(intent.action_call, call);      startactivity(surf); 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -