Name: Find the next scheduled time. Description by example: You need to start a service each day at 5 am, 6:30 am and 8 pm. You need to find the ticks values of the next scheduled time, either today or tomorrow if it is after 8pm. Dim t As Long = FindNextTime(Array As Double(5, 6.5, 20))...
www.b4x.com
1 If the receiver start check if it is monday.
2 If not, reschedule the receiver for the next day...
3 GOTO 1
Name: Find the next scheduled time. Description by example: You need to start a service each day at 5 am, 6:30 am and 8 pm. You need to find the ticks values of the next scheduled time, either today or tomorrow if it is after 8pm. Dim t As Long = FindNextTime(Array As Double(5, 6.5, 20))...
www.b4x.com
1 If the receiver start check if it is monday.
2 If not, reschedule the receiver for the next day...
3 GOTO 1
I use this code since that Erel created the post.
It works fine, but due the new updates in Android, if the user don't open the app in 2-3 days, the alarm is not rising.
Maybe I need made some modification in the code to alarm still showing after some days, but I don't know how.
I think so that in the new Android 14 this option of alarm will be more restrict.