Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intent.ACTION_CALL problem(SecurityException)

Tags:

android

I have use this intent to dial a no which is written in the setdatafield of the Intent But when I run app and click on the button of call where i put this intent i got this error in LogCat

06-14 14:08:10.137: ERROR/AndroidRuntime(2898): java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.CALL dat=tel:2125551212  cmp=com.android.phone/.OutgoingCallBroadcaster } from ProcessRecord{43edbe18 2898:com.collabera.labs.sai/10102} (pid=2898, uid=10102) requires android.permission.CALL_PHONE
like image 273
Parth Avatar asked Jun 14 '11 08:06

Parth


1 Answers

The Intent.ACTION_DIAL intent (instead of Intent.ACTION_CALL) doesn't need a permission. It only brings up the dialer so the user can decide himself whether or not to call, which is a better user experience in most cases anyway.

like image 151
koljaTM Avatar answered Nov 16 '22 01:11

koljaTM