android app crash on android 4.4 due to gps permission denial
问题 My android app is crashing when I try to enable GPS on my android 4.4 (Kitkat) . It's been working fine till Android 4.3 . I am using following code to turn on GPS Intent intent = new Intent("android.location.GPS_ENABLED_CHANGE"); intent.putExtra("enabled", true); this.sendBroadcast(intent); In my Log Cat its giving security exception. My LogCat details are as :- 11-27 12:47:37.410: E/AndroidRuntime(3818): Caused by: java.lang.SecurityException: Permission Denial: not allowed to send