还是说代码
IntentFilter intentFilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
Intent intent = null;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
intent = context.registerReceiver(sBatteryReceiver, intentFilter, Context.RECEIVER_EXPORTED);
} else {
intent = context.registerReceiver(sBatteryReceiver, intentFilter);
}
sBatteryReceiver.setBatteryLevelByIntent(intent);
这块我需要对
Intent.ACTION_BATTERY_CHANGED(public static final String ACTION_BATTERY_CHANGED = “android.intent.action.BATTERY_CHANGED”;)(此定义在Intent.java)
android.intent.action.BATTERY_CHANGED在清单那边导出?