flutter_lockscreen_alert 1.0.6
flutter_lockscreen_alert: ^1.0.6 copied to clipboard
Flutter plugin to show critical alert UI on the device lock screen using Android full-screen intents. Ideal for incoming calls, bookings, or time-sensitive alerts that must be visible and interactive [...]
1.0.6 #
- Android: Set SharedPreferences key
flutter_lockscreen_alert_activity_visible(in FlutterSharedPreferences) when the lock-screen Activity is shown and clear it when destroyed, so the host app can close its overlay and avoid showing two booking cards (overlay + lock-screen UI). - Android: Acquire a brief WakeLock when posting the full-screen notification so the screen starts waking before the activity launches.
1.0.5 #
- Android: Acquire
WakeLock(SCREEN_BRIGHT_WAKE_LOCK | ACQUIRE_CAUSES_WAKEUP) when the lock-screen Activity is shown so the screen fully wakes on OEMs (e.g. Xiaomi/MIUI) that otherwise only show a brief "breath" or edge light. - Android: Add
FLAG_KEEP_SCREEN_ONand window flags for show-when-locked / turn-screen-on so the screen stays on while the booking UI is visible. - Android: Use an opaque dark window background and fullscreen theme so the Activity is visible on lock screen; transparent window could result in no visible UI on some devices.
1.0.4 #
- Android: Fix Java compilation when host app uses compileSdk < 27: use literal flag values for show-when-locked and turn-screen-on instead of
Intentconstants that were added in API 27.
1.0.3 #
- Android: Cancel the notification in
LockscreenAlertActivity.onStart()so the user sees only the full-screen booking UI and not a notification tile when the lock screen wakes. - Android: Use
NotificationManager.IMPORTANCE_MAXfor the alert channel so the full-screen intent fires immediately (screen wake, activity launch). - Android: Add
FLAG_ACTIVITY_SHOW_WHEN_LOCKEDandFLAG_ACTIVITY_TURN_SCREEN_ONto the full-screen intent (API 27+) so the screen wakes and the activity shows over the lock screen without requiring a tap on a notification.
1.0.2 #
- Android: Fix resource linking by removing
windowShowWhenLockedandwindowTurnScreenOnfrom theme XML entirely; the Activity already sets these programmatically inonCreate()(API 27+). Fixes "style attribute not found" when merging resources. - Android: Fix Java compilation:
provideFlutterEngine(Context)is nowpublicto match the Flutter embeddingHostinterface.
1.0.1 #
- Android: Fix resource linking error when app
minSdkVersionis below 27. MovedwindowShowWhenLockedandwindowTurnScreenOnintovalues-v27/styles.xmlso the base theme does not reference API-27-only attributes. Lock-screen behaviour unchanged on API 27+.
1.0.0 #
- Initial release.
- Android: full-screen intent notification and lock-screen Activity with Flutter UI.
- Dart API:
show,dismiss,getPayload,notifyDismissed,notifyAccepted,onAction,isSupported. - iOS: not implemented.