Skip to content

Package broadcast receiver > skip work if low battery  #146

Closed

Description

@mmathieum

Avoid draining the battery to eagerly deploy DB when it's not always going to be useful for the user and the device battery might be low.


Code:

  • ModuleReceiver
  • <!-- MODULE CHANGE RECEIVER -->
    <receiver
    android:name=".receiver.ModuleReceiver"
    android:exported="true">
    <intent-filter>
    <action android:name="android.intent.action.PACKAGE_ADDED" />
    <action android:name="android.intent.action.PACKAGE_CHANGED" />
    <action android:name="android.intent.action.PACKAGE_DATA_CLEARED" />
    <action android:name="android.intent.action.PACKAGE_FIRST_LAUNCH" />
    <action android:name="android.intent.action.PACKAGE_FULLY_REMOVED" />
    <action android:name="android.intent.action.PACKAGE_INSTALL" />
    <action android:name="android.intent.action.PACKAGE_NEEDS_VERIFICATION" />
    <action android:name="android.intent.action.PACKAGE_REMOVED" />
    <action android:name="android.intent.action.PACKAGE_REPLACED" />
    <action android:name="android.intent.action.PACKAGE_RESTARTED" />
    <action android:name="android.intent.action.PACKAGE_VERIFIED" />
    <data
    android:host="${applicationId}"
    android:scheme="package" />
    </intent-filter>
    <intent-filter>
    <action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
    <action android:name="android.intent.action.MY_PACKAGE_SUSPENDED" />
    <action android:name="android.intent.action.MY_PACKAGE_UNSUSPENDED" />
    </intent-filter>
    </receiver>

Links:

Activity

  1. self-assigned this
    on May 14, 2026
  2. added theissue type on May 14, 2026
  3. added
    P2
    S
    on May 14, 2026
  4. changed the title [-]broadcast receiver> skip work if low battery [/-] [+]Package broadcast receiver > skip work if low battery [/+] on May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2S

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions