Android: make immediate calls -
i'm trying write app that, among other things, calls people. this, use following code:
intent callintent = new intent(intent.action_call); callintent.setdata(uri.parse("tel:" + number)); callintent.addflags(intent.flag_activity_new_task); startactivity(callintent);
the problem is: when run it, shows me dialog , need choose app want make call (skype/viber/dialer/etc.). how can make call using standard dialer (without dialog showing up)?
the difference between intent.action_dial
, intent.action_call
first 1 allows user explicitly initiate call showing dialer ui. when using action_call
, pop-up open , let choose dialer use.
also, add permission on manifest:
<uses-permission android:name="android.permission.call_phone" />
Comments
Post a Comment