Questions tagged «android-implicit-intent»

20
如何在Android中使用Intent拨打电话?
我正在使用以下代码在Android中拨打电话,但它给我带来了安全异常,请提供帮助。 posted_by = "111-333-222-4"; String uri = "tel:" + posted_by.trim() ; Intent intent = new Intent(Intent.ACTION_CALL); intent.setData(Uri.parse(uri)); startActivity(intent); 权限 <uses-permission android:name="android.permission.CALL_PHONE" /> 例外 11-25 14:47:01.661: ERROR/AndroidRuntime(302): Uncaught handler: thread main exiting due to uncaught exception 11-25 14:47:01.681: ERROR/AndroidRuntime(302): java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.CALL dat=tel:111-333-222-4 cmp=com.android.phone/.OutgoingCallBroadcaster } from ProcessRecord{43d32508 …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.