简体   繁体   中英

Call in Android application shows add contact dialog

I'm using this code for calling, in Android application:

Intent callIntent = new Intent(Intent.ACTION_CALL);    
callIntent.setData(Uri.parse("tel:" + call.Number));   
startActivity(callIntent);

but I obtain a dialog like this:

在此处输入图片说明

Why no call is make?

Ps: I'm using a Tablet (Acer Iconia A501), not a smartphone.

Try this

Make sure :

call to :

 startActivity(new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" +mEditText_number.getText())));

Add permission:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM