xallysie / cordova-plugin-android14-schedule-exact-alarm

this cordova plugin is designed to support developers who are targeting Android 14+ (API 34+), which introduced stricter rules around scheduling exact alarms
Apache License 2.0
0 stars 0 forks source link

More clarification needed #1

Open ppetree opened 4 months ago

ppetree commented 4 months ago

I'm beginning work on a new app that will require a daily notification at an exact time.

Does this plugin just handle permissions for this one use case (Android 14)? If so, how does this differ from the cordova-plugin-android-permission?

xallysie commented 4 months ago

It just handles this one use case.

The logic for requesting the SCHEDULE_EXACT_ALARM permission (denied by default in Android 14) is different from other types of Android permissions covered by @NeoLSN's plugin. This plugin opens the Alarms & Reminders setting and prompts users to toggle-enable the permission themselves. They will then have to use the back arrow at the top of the screen to return to your app.

After requesting Alarms & Permissions, you will still need to request local notifications (e.g., POST_NOTIFICATIONS) using @NeoLSN's plugin for Android 12+ users.

I personally use this plugin with https://github.com/NeoLSN/cordova-plugin-android-permissions and https://github.com/fquirin/cordova-plugin-local-notifications to ensure notifications work for Android 12+ users.

ppetree commented 4 months ago

Thank you for that wonderful explanation and for updating your readme!

@fquirin's release is still 6 years behind and, most likely will not compile with Volt.build because it's not on NPM.

If yours is not on NPM, us volt-build users will hit a wall there too.

xallysie commented 4 months ago

You're welcome! :)

One of the other forks should be on npm. If you find one that works, please link it here as a resource.

This plugin is on npm: https://www.npmjs.com/package/cordova-plugin-android14-schedule-exact-alarm

ppetree commented 4 months ago

The only notification plugin I have found to work using Cordova Android 12.0 and sdk 33 is this one

  <plugin name="@mixon00/cordova-plugin-local-notification" spec="0.9.1" />