user1029593 user1029593 - 1 year ago 169
Android Question

How to launch android.intent.action.CALL in service?

How to launch

(to get USSD) code in service?

My Code:

protected void call(String phoneNumber) {
try {
new Intent("android.intent.action.CALL", Uri.parse("tel:"
+ phoneNumber)), 1);
} catch (Exception eExcept) {
//this.view.append("\n\n " + "\n" + eExcept.toString());

This code does not work, the problem with

Answer Source

This is the intent for call

 Intent intent = new Intent(Intent.ACTION_CALL,Uri.parse("tel:"+phoneno));

& Dont miss the Add permission in Maniefiest

<uses-permission android:name="android.permission.CALL_PHONE"></uses-permission>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download