How can I disable GPS via code without user intervention?
How can I disable GPS via code without user intervention?
Try this strategy, it worked for me some time ago in the project that was, I do not remember the version I used Android - it only had this stretch saved for backup.
Intent intent = new Intent("android.location.GPS_ENABLED_CHANGE");
intent.putExtra("enabled", false);
sendBroadcast(intent);