由网友(蚀心者)分享简介:我用这个code调用,在Android应用程序:I'm using this code for calling, in Android application:Intent callIntent = new Intent(Intent.ACTION_CALL); callIntent.setData(Uri...
我用这个code调用,在Android应用程序:
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:我使用的是平板电脑(宏碁Iconia A501),而不是智能手机。
P.s: I'm using a Tablet (Acer Iconia A501), not a smartphone.
推荐答案
试试这个
确认:
调用:
startActivity(new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" +mEditText_number.getText())));
添加权限:
<uses-permission android:name="android.permission.CALL_PHONE" />
相关推荐
最新文章