lifecycle_guard_android 1.0.1
lifecycle_guard_android: ^1.0.1 copied to clipboard
Android implementation of lifecycle_guard for mission-critical background execution.
🤖 lifecycle_guard_android #
The bulletproof Android implementation for mission-critical background execution.
This package ensures your background tasks survive termination on Android devices using a robust Foreground Service architecture.
🎬 Demo #
⚙️ Android Native Setup #
For this plugin to work, you must add the following configuration to your android/app/src/main/AndroidManifest.xml.
1. Permissions #
Add these permissions outside the <application> tag:
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
2. Service Declaration #
Add this inside the <application> tag:
<service
android:name="com.crealify.lifecycle_guard_android.LifecycleService"
android:foregroundServiceType="dataSync"
android:exported="false">
</service>
🦾 Features (Android) #
- Android 15+ Compliance: Uses the required
dataSyncservice type. - Battery Optimization Override: Helps tasks survive Doze Mode.
- Swipe-to-Kill Protection: The service stays alive even if the user swipes the app away from the multitasking view.
📄 License #
BSD 3-Clause License — see LICENSE for details.
Built with ❤️ by Crealify