-
public class AegisLocalSchedulerSDK_PUSH_INAPP_PARITY_TRACKER P6 — local notification scheduling.
Host apps call scheduleLocal with a future epoch-ms timestamp and a payload. The scheduler arms an AlarmManager intent that fires AegisLocalAlarmReceiver; the receiver re-builds the notification and shows it via NotificationCompat.
Why this matters: in-app journeys triggered by behavioral signals (cart_abandoned 30 min ago, streak_at_risk midnight reminder) cannot fire a server push if the device is offline. Local scheduling closes this — server schedules + SDK persists + fires regardless of connectivity.
iOS equivalent uses UNUserNotificationCenter.add(UNNotificationRequest). RN + Flutter bridges expose
scheduleLocalthrough their existing method channels (no JS/Dart implementation; pure pass-through).Persistence: AlarmManager survives process death but NOT a reboot unless the alarm is set with setAndAllowWhileIdle. Re-scheduling after reboot requires RECEIVE_BOOT_COMPLETED + a BootReceiver — that polish ships in a follow-up. For now: a reboot during the window loses the alarm.
-
-
Field Summary
Fields Modifier and Type Field Description private final StringCHANNEL_IDprivate final StringEXTRA_NOTIFICATION_IDprivate final StringEXTRA_TITLEprivate final StringEXTRA_BODYprivate final StringEXTRA_DEEPLINKpublic final static AegisLocalSchedulerINSTANCE
-
Method Summary
Modifier and Type Method Description final static IntegerscheduleLocal(Context context, Long whenEpochMs, String title, String body, String deepLink)Schedule a local notification to fire at whenEpochMs. final static Unitcancel(Context context, Integer requestCode)Cancel a previously-scheduled local notification by requestCode. final StringgetCHANNEL_ID()final StringgetEXTRA_NOTIFICATION_ID()final StringgetEXTRA_TITLE()final StringgetEXTRA_BODY()final StringgetEXTRA_DEEPLINK()-
-
Method Detail
-
scheduleLocal
final static Integer scheduleLocal(Context context, Long whenEpochMs, String title, String body, String deepLink)
Schedule a local notification to fire at whenEpochMs. Returns a request code the host can pass to cancel later.
-
cancel
final static Unit cancel(Context context, Integer requestCode)
Cancel a previously-scheduled local notification by requestCode.
-
getCHANNEL_ID
final String getCHANNEL_ID()
-
getEXTRA_NOTIFICATION_ID
final String getEXTRA_NOTIFICATION_ID()
-
getEXTRA_TITLE
final String getEXTRA_TITLE()
-
getEXTRA_BODY
final String getEXTRA_BODY()
-
getEXTRA_DEEPLINK
final String getEXTRA_DEEPLINK()
-
-
-
-