以编程方式在Samsung J3上加载节电屏幕

时间:2018-03-04 04:57:32

标签: android samsung-mobile batterymanager power-saving

我想通过编程方式在 Samsung J3 设备上加载电池保护程序菜单,其中包含android 棒棒糖。我尝试过以下代码段:

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

但它会抛出 ActivityNotFoundException

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

1 个答案:

答案 0 :(得分: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