0

我想在带有 android lollipop的Samsung J3设备上以编程方式从活动加载电池保护程序菜单。我尝试了以下代码段:

Intent intent=new Intent(Settings.ACTION_BATTERY_SAVER_SETTINGS);
startActivity(intent);

但它抛出ActivityNotFoundException

以编程方式在 J3 设备上加载节电屏幕的任何其他方式?

4

1 回答 1

0
/**
     * Activity Action: Show battery saver settings.
     * <p>
     * In some cases, a matching Activity may not exist, so ensure you safeguard
     * against this.
     */

请参阅 google 文档,您的设备不支持此活动。 https://developer.android.com/reference/android/provider/Settings.html#ACTION_BATTERY_SAVER_SETTINGS

于 2018-03-04T07:04:58.187 回答