0

Trying to open power settings. I don't see it here...

http://developer.android.com/reference/android/provider/Settings.html

Malfist
  • 31,179
  • 61
  • 182
  • 269
Mr. Awesome
  • 575
  • 1
  • 6
  • 19
  • No, Phil. Ultimately, we removed the "Battery Settings" functionality from the application as we felt that any basically experienced Android user would be able to readily access the power settings, etc. from the stock OS UI path. – Mr. Awesome Aug 20 '13 at 12:46

1 Answers1

0

You should be able to open it using Intent. A quick search for the power settings activity has found the setting com.android.settings.widget.SettingsAppWidgetProvider. You should be able to open it from your Activity using the code:

startActivity(new Intent("com.android.settings.widget.SettingsAppWidgetProvider"));
Phil
  • 35,852
  • 23
  • 123
  • 164
  • That line of code crashes/force close. I've added the permission DEVICE_POWER. – Mr. Awesome Aug 03 '11 at 15:14
  • 1
    Did adding said permission take care of the crash? – Phil Aug 03 '11 at 15:15
  • @Mr. Awesome, is this an activity that you are able to access from the main settings? – Phil Aug 03 '11 at 15:19
  • I should be able to, but I have a "Battery Settings" button and would like to jump directly to there via a click. – Mr. Awesome Aug 03 '11 at 15:21
  • @Mr. Awesome, this is a duplicate question. See http://stackoverflow.com/questions/3673036/create-battery-usage-intent-android – Phil Aug 03 '11 at 15:23
  • No, It's not a duplicate question, changing the actual battery settings and configuration is not equal to viewing the current battery usage. – Mr. Awesome Aug 03 '11 at 15:25
  • This again doesn't point directly to a battery settings activity, but it may prove more useful than the other post: http://stackoverflow.com/questions/6742592/how-to-view-the-battery-usage-settings-in-android – Phil Aug 03 '11 at 15:32