Fixed
Status Update
Comments
al...@google.com <al...@google.com> #2
Triaging to platform owner for consideration.
kf...@gmail.com <kf...@gmail.com> #3
According to the documentation:
"Apps targeting lower sdk versions, can always schedule exact alarms."
https://developer.android.com/reference/android/app/AlarmManager.html#canScheduleExactAlarms()
So the API could delegate the implementation to the platform on API level 31 and above or simply return true otherwise.
I will try to submit a patch.
"Apps targeting lower sdk versions, can always schedule exact alarms."
So the API could delegate the implementation to the platform on API level 31 and above or simply return true otherwise.
I will try to submit a patch.
su...@google.com <su...@google.com> #4
I do not see a problem with this proposal.
su...@google.com <su...@google.com>
al...@google.com <al...@google.com>
ap...@google.com <ap...@google.com> #6
Project: platform/frameworks/support
Branch: androidx-main
commit 7ba12fe5c61b9b925bb45fddf73cc86d4de6a379
Author: Kamal Faraj <kfaraj.dev@gmail.com>
Date: Tue Jan 16 20:44:03 2024
Add AlarmManagerCompat.canScheduleExactAlarms API
Relnote: Added AlarmManagerCompat.canScheduleExactAlarms API
Fixes: 315440583
Test: ./gradlew core:core:assemble
Change-Id: I62e957be392889a944d0c575f26fff12abd590a6
M core/core/api/current.txt
M core/core/api/restricted_current.txt
M core/core/src/main/java/androidx/core/app/AlarmManagerCompat.java
https://android-review.googlesource.com/2911585
Branch: androidx-main
commit 7ba12fe5c61b9b925bb45fddf73cc86d4de6a379
Author: Kamal Faraj <kfaraj.dev@gmail.com>
Date: Tue Jan 16 20:44:03 2024
Add AlarmManagerCompat.canScheduleExactAlarms API
Relnote: Added AlarmManagerCompat.canScheduleExactAlarms API
Fixes: 315440583
Test: ./gradlew core:core:assemble
Change-Id: I62e957be392889a944d0c575f26fff12abd590a6
M core/core/api/current.txt
M core/core/api/restricted_current.txt
M core/core/src/main/java/androidx/core/app/AlarmManagerCompat.java
na...@google.com <na...@google.com> #7
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.core:core:1.13.0-alpha04
Description
Version used: 1.12.0
Devices/Android versions reproduced on: N/A
As described below:
"To check whether the permission is granted to your app, call canScheduleExactAlarms() before trying to set an exact alarm."
However, the API canScheduleExactAlarms() was added to AlarmManager in API level 31 so it would be very useful to add it to AlarmManagerCompat for backward compatibility.