开发者

How to programmatically open Power Settings activity in Android?

开发者 https://www.devze.com 2023-03-25 04:36 出处:网络
Trying to open power settings. I don\'t see it here... http://developer.android.com/reference/a开发者_C百科ndroid/provider/Settings.htmlYou should be able to open it using Intent. A quick search for

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

http://developer.android.com/reference/a开发者_C百科ndroid/provider/Settings.html


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"));
0

精彩评论

暂无评论...
验证码 换一张
取 消