Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Calendar Reminders on Android 14 #217

Open
7 tasks done
Neiyk opened this issue Apr 27, 2024 · 8 comments
Open
7 tasks done

Missing Calendar Reminders on Android 14 #217

Neiyk opened this issue Apr 27, 2024 · 8 comments
Labels
bug Something is not working

Comments

@Neiyk
Copy link

Neiyk commented Apr 27, 2024

Checklist

  • I can reproduce the bug with the latest version given here.
  • I made sure that there are no existing issues - open or closed - to which I could contribute my information.
  • I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
  • I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

Affected app version

1.0.3

Affected Android/Custom ROM version

Android 14

Affected device model

Samsung Galaxy S22

How did you install the app?

Google Play Store

Steps to reproduce the bug

  1. Install Fossify Calendar on Android 14 device
  2. Grant Fossify Calendar all needed Permissions
  3. Exclude Fossify Calendar in Android settings from Energy saving
  4. Allow Fossify Calendar in Android settings to run all the time in Background
  5. Set an time in Fossify Calendar in two hours with two different times 30 minutes before and one at begin
  6. Close all apps
  7. wait for reminder
  8. Repeat steps 1. to 7. but now restart your smartphone instead of closing all apps

Expected behavior

All timer reminders should appear exactly on time

Actual behavior

Timer reminders from Fossify Calendar are missing, coming to late or will come only if the app will opened manually

Screenshots/Screen recordings

No response

Additional information

Hello,

Fossify Calendar (and also Simple Calendar) do not activate the reminders on the right time, many hours to late or only if the calendar app will manually opened on Android 14 (might be also an issue on Android 13).
The issue appears even Fossify Calendar is excluded from Android energy saving and allowed all the time to run in the background.

As you can also see on the Google Play store reviews for Simple Calendar many users have the same issue with missing or "forgotten" reminders.

The cause seems the changed permissions rights in Android 13/14 to set exact timers as documented in Google Developer forum.

I have two different Samsung Galaxy smartphones with Android 14 (and One UI Version 6.0) with that issue.

Could you please check/fix that issue and test it with an Android 14 device?
 
 
Schedule exact alarms are denied by default (more details see on source page)
https://developer.android.com/about/versions/14/changes/schedule-exact-alarms :

Schedule exact alarms are denied by default

Exact alarms are meant for user-intentioned notifications or actions that need to happen at a precise time.

SCHEDULE_EXACT_ALARM, the permission introduced in Android 12 for apps to schedule exact alarms, is no longer being pre-granted to most newly installed apps targeting Android 13 and higher (will be set to denied by default). If the user transfers app data to a device running Android 14 through a backup-and-restore operation, the permission will still be denied. If an existing app already has this permission, it'll be pre-granted when the device upgrades to Android 14.

The SCHEDULE_EXACT_ALARM permission is required to initiate exact alarms via the following APIs or a SecurityException will be thrown:

  • setExact()
  • setExactAndAllowWhileIdle()
  • setAlarmClock()

Existing best-practices for the SCHEDULE_EXACT_ALARM permission still apply, including the following:

  • Check the permission with canScheduleExactAlarms() before scheduling exact alarms.
  • Set up your app to listen and properly react to the foreground broadcast AlarmManager.ACTION_SCHEDULE_EXACT_ALARM_PERMISSION_STATE_CHANGED, which the system sends when the user grants the permission.

Affected apps

If a device is running Android 14 or higher, this change will affect a newly installed app that has the following characteristics:

  • Targets Android 13 (API level 33) or higher.
  • Declares the SCHEDULE_EXACT_ALARM permission in the manifest.
  • Doesn't fall under an exemption or pre-grant scenario.
  • Isn't a calendar or alarm clock app.

Calendar and alarm clock apps should declare USE_EXACT_ALARM

Calendar or alarm clock apps need to send calendar reminders, wake-up alarms, or alerts when the app is no longer running. These apps can request the USE_EXACT_ALARM normal permission. The USE_EXACT_ALARM permission will be granted on install, and apps holding this permission will be able to schedule exact alarms just like apps with the SCHEDULE_EXACT_ALARM permission."

 
See also

Android 12: Using SCHEDULE_EXACT_ALARM permission to get/show data at specific time are safe in Google Play Policy?
https://stackoverflow.com/questions/71031091/android-12-using-schedule-exact-alarm-permission-to-get-show-data-at-specific-t

Android 14 - Behavior changes: all apps
Core functionality -> Schedule exact alarms are denied by default
https://developer.android.com/about/versions/14/behavior-changes-all

@Neiyk Neiyk added bug Something is not working needs triage Issue is not yet ready for PR authors to take up labels Apr 27, 2024
@Aga-C
Copy link
Member

Aga-C commented Apr 27, 2024

If anybody else also encounters this bug, please write your device model and OS version. I have Android 14 (OnePlus 9 Pro), and all reminders are working correctly. On Android 13 I also didn't have any problems with that.

@DazzyWalkman
Copy link

I have the same issue as OP. Redmi Note 11 5G (evergo), Android 13, MIUI 14.0.4. The stock calendar app reminder works fine.

@nofishonfriday
Copy link
Contributor

The cause seems the changed permissions rights in Android 13/14 to set exact timers as documented in Google Developer forum.

It's already using the new USE_EXACT_ALARM permission:

<uses-permission android:name="android.permission.USE_EXACT_ALARM" />

(Though I have no idea what else the issue could be, nor have a Android 14 device to test.)

@tobykurien
Copy link

Same issue on Nokia One Plus with Android 11, Fossify Calendar v1.0.3 from F-Droid. All battery optimisations turned off (Battery manager off, don't optimize battery for Fossify Calendar, override "do not disturb"). Also followed the instructions at https://dontkillmyapp.com/hmd-global without luck. If I create an event with a reminder within a few hours, it works for that event, but if it's a recurring event, it won't notify the next day or any day thereafter.

The solution to this might be to create a persistent foreground service that prevents the app from being killed. Perhaps it can also "refresh" the alarms if they get killed/removed.

@cahogithub
Copy link

Same issue on Xiaomi Mi Note 10 Lite with Android 12
Fossify Calendar v1.0.3 from F-Droid

My work around: Export all to a isc file, delete all appointments and reimport all after restart.

@Aga-C Aga-C removed the needs triage Issue is not yet ready for PR authors to take up label Jul 27, 2024
@tobykurien
Copy link

Same issue on Nokia One Plus with Android 11, Fossify Calendar v1.0.3 from F-Droid.

A workaround for me is to install the Calendar Notifications app from F-droid which works just fine: https://f-droid.org/en/packages/com.github.quarck.calnotify/

Perhaps the devs can look into what that app has done to make the notifications work reliably (even without using the setAlarmClock method in the settings of that app).

@jenda69
Copy link

jenda69 commented Aug 29, 2024

Same issue on Nothing Phone (2a), Android 14, battery usage set to unrestricted.
I created a test event few minutes in the future and got notified OK. Then I left the phone on the table over night and in the morning notifications for ordinary events didn't go off.

@adrnam
Copy link

adrnam commented Nov 18, 2024

Same issue on Xiaomi 12T, Android 14 UP1A.230905.011 , security update 2024-09-01.
If I set reminder "one hour before" event, the notification is delayed. For example, I set an event at 13h and a reminder one hour before, then I receive the notification at 12h07.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working
Projects
None yet
Development

No branches or pull requests

8 participants