try this... if u want to open Location and security page: Intent intent = new Intent(Settings.ACTION_SECURITY_SETTINGS); startActivity(intent);
hope this helps. On Sat, Jun 20, 2009 at 2:23 PM, Android Users <androidmai...@gmail.com>wrote: > 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---