Hi Team,
I'm trying to set up an alarm that will repeat every 7 days based on this example:
Is this code correct? thanks in advance
Edit: What is needed to repeatthis alarm every 7 days?
I'm trying to set up an alarm that will repeat every 7 days based on this example:
Start receiver at exact time
The standard StartReceiverAt is inexact, in order to allow the OS to make optimizations. Worth reading: https://developer.android.com/training/scheduling/alarms Exact scheduling: 1. AddPermission(android.permission.SCHEDULE_EXACT_ALARM) 2. Private ion As Object - class global 3. Private...
www.b4x.com
Is this code correct? thanks in advance
B4X:
Private Sub Button2_Click
Wait For (GetScheduleExactAlarmPermission) Complete (HasPermission As Boolean)
if HasPermission Then
StartServiceAtExact(ScheduledReceiver, DateTime.Now + 7 * DateTime.TicksPerDay, True) ' Schedule for 7 days later
Else
Log("no permission")
End If
End Sub
Edit: What is needed to repeatthis alarm every 7 days?
Last edited: