Something is still not clear for me; I have to monitoring the battery level and i wrote inside my service in th onCreate this lines:
public void onCreate(){
super.onCreate();
mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
}
Then in the Manifest:
<receiver android:name=".ReceversAndServices.BatteryLevelReceiver">
<intent-filter>
<action android:name="android.intent.action.BATTERY_CHANGED" />
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
What i don't understand is.. Is it correct write the Intent Intent.ACTION_BATTERY_CHANGED
in the java and also android.intent.action.BATTERY_CHANGED
in the Manifest? Or just need only one?