Download the PHP package smronju/nativephp-local-notifications without Composer
On this page you can find all versions of the php package smronju/nativephp-local-notifications. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download smronju/nativephp-local-notifications
More information about smronju/nativephp-local-notifications
Files in smronju/nativephp-local-notifications
Package nativephp-local-notifications
Short Description Schedules a one-off local notification for an exact future date and time, or a daily-repeating one, and cancels either — no server, no push, works fully offline.
License MIT
Homepage https://github.com/smronju/nativephp-local-notifications
Informations about the package nativephp-local-notifications
NativePHP Local Notifications
Schedules a local notification — one-off at an exact future date and time, or
repeating every day at the same time — and cancels either, for
NativePHP Mobile. No server, no push, no network — works
fully offline. iOS uses UNUserNotificationCenter; Android uses AlarmManager
(exact-alarm scheduling) + a BroadcastReceiver that builds the notification
directly, so it fires even if the app isn't running.
Unlike the official paid Background+Local bundle, this does exactly two things:
fire a notification at a specific date and time you choose, or fire one every day
at the same time — not the full dailyAt/weeklyOn cadence grammar.
Requirements
nativephp/mobile^3.0 or ^4.0- iOS 15.0+, Android API 26+
Installation
Then rebuild: php artisan native:run.
Usage
All calls are fire-and-forget: there's no event to listen for, because there's nothing meaningful to report back. Scheduling either succeeds or the OS silently suppresses it (no permission, alarm restricted, etc.) — either way there's no action for your app to take in response.
Notes
- No contact with your server: this schedules against the OS, not a push service — nothing to sync, nothing that needs the device online.
- Exact alarms on Android 12+: this plugin requests
SCHEDULE_EXACT_ALARM, but on API 33+ the user must still grant "Alarms & reminders" access via system Settings — there's no runtime dialog for it. If it isn't granted, scheduling falls back to an inexact alarm rather than crashing; the notification may then arrive within a short window of the requested time rather than exactly on it. - Tapping a notification opens the app (its default launcher activity) — it does not deep-link anywhere specific. Handle in-app routing yourself if you need that.
- Daily reminders have static content. Nothing queries your app's data at fire time — the title/body you pass at scheduling time is what shows every day. If you need "3 overdue items" instead of "you may have overdue items," reschedule the daily reminder with fresh text each time your app launches (still repeating daily from that point — this only refreshes the copy, not the cadence).
- Android has no native daily-repeating exact alarm.
scheduleDaily()schedules the next occurrence and theBroadcastReceiverreschedules the one after that every time it fires — so the chain only continues as long as nothing cancels it; nothing needs the app process to be running. iOS'sUNCalendarNotificationTrigger(repeats: true)handles this natively with no such reschedule step.
License
MIT