Hi all,
I tried to display the settings page so that the user can enable or disable
GPS. It works fine in the emulator but on the device it gives a
ActivitynotFoundException...
Any one know what the problem is?
The code used to display is below:
ComponentName toLaunch;
Intent intent;
toLaunch = new
ComponentName("com.android.settings","com.android.settings.SecuritySettings");
intent = new
Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
intent.setComponent(toLaunch);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---