Score creedengo: 5sur5

It’s always good that an app has different behavior when device is connected/disconnected to a power station, or has different battery levels. One can monitor the changes in charging state with a broadcast receiver registered on the actions ACTION_POWER_CONNECTED and ACTION_POWER_DISCONNECTED, or monitor significant changes in battery level with a broadcast receiver registered on the actions BATTERY_LOW and BATTERY_OKAY.

Compliant Code Example

<receiver android:name="org.greencodeinitiative.testapp.core.service.MyReceiver">
    <intent-filter>
        <action android:name="android.intent.action.ACTION_POWER_CONNECTED"/>
    </intent-filter>
</receiver>

or

<receiver android:name="org.greencodeinitiative.testapp.core.service.MyReceiver">
    <intent-filter>
        <action android:name="android.intent.action.ACTION_POWER_DISCONNECTED"/>
    </intent-filter>
</receiver>

or

<receiver android:name="org.greencodeinitiative.testapp.core.service.MyReceiver">
    <intent-filter>
        <action android:name="android.intent.action.ACTION_POWER_BATTERY_OKAY"/>
    </intent-filter>
</receiver>

or

<receiver android:name="org.greencodeinitiative.testapp.core.service.MyReceiver">
    <intent-filter>
        <action android:name="android.intent.action.ACTION_POWER_BATTERY_LOW"/>
    </intent-filter>
</receiver>