AlarmManager.CanScheduleExactAlarms Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called to check if the caller can schedule exact alarms.
[Android.Runtime.Register("canScheduleExactAlarms", "()Z", "GetCanScheduleExactAlarmsHandler", ApiSince=31)]
public virtual bool CanScheduleExactAlarms ();
[<Android.Runtime.Register("canScheduleExactAlarms", "()Z", "GetCanScheduleExactAlarmsHandler", ApiSince=31)>]
abstract member CanScheduleExactAlarms : unit -> bool
override this.CanScheduleExactAlarms : unit -> bool
Returns
true
if the caller can schedule exact alarms, false
otherwise.
- Attributes
Remarks
Called to check if the caller can schedule exact alarms. Your app schedules exact alarms when it calls any of the setExact...
or #setAlarmClock(AlarmClockInfo, PendingIntent) setAlarmClock
API methods.
Apps targeting Build.VERSION_CODES#S
or higher can schedule exact alarms only if they have the Manifest.permission#SCHEDULE_EXACT_ALARM
permission or they are on the device's power-save exemption list. These apps can also start android.provider.Settings#ACTION_REQUEST_SCHEDULE_EXACT_ALARM
to request this permission from the user.
Apps targeting lower sdk versions, can always schedule exact alarms.
Java documentation for android.app.AlarmManager.canScheduleExactAlarms()
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.