tufanv Expert Licensed User Longtime User Sep 20, 2016 #1 Hello I want to set an alarm clock for a specific time. I searched the forum and found this code : Code: Dim i As Intent i.Initialize("android.intent.action.SET_ALARM", "") i.PutExtra("android.intent.extra.alarm.HOUR", 16) i.PutExtra("android.intent.extra.alarm.MINUTES", 58) i.PutExtra("android.intent.extra.alarm.SKIP_UI", False) StartActivity(i) this does the trick and set an alarm to 16:58. but is it possible to delete the alarm after it has been executed ? ( even the user does not have the app on foregorund ) TY Last edited: Sep 20, 2016
Hello I want to set an alarm clock for a specific time. I searched the forum and found this code : Code: Dim i As Intent i.Initialize("android.intent.action.SET_ALARM", "") i.PutExtra("android.intent.extra.alarm.HOUR", 16) i.PutExtra("android.intent.extra.alarm.MINUTES", 58) i.PutExtra("android.intent.extra.alarm.SKIP_UI", False) StartActivity(i) this does the trick and set an alarm to 16:58. but is it possible to delete the alarm after it has been executed ? ( even the user does not have the app on foregorund ) TY
bgsoft Well-Known Member Licensed User Longtime User Sep 20, 2016 #2 In developer android there is nothing to cancel: https://developer.android.com/guide...ilters.html#q=android.intent.action.SET_ALARM Put SKIP UI to True and the user can cancel. Regards Upvote 0
In developer android there is nothing to cancel: https://developer.android.com/guide...ilters.html#q=android.intent.action.SET_ALARM Put SKIP UI to True and the user can cancel. Regards
tufanv Expert Licensed User Longtime User Sep 20, 2016 #3 Isnt it even possible to delete manually an alarm from the app programaticly ? Upvote 0
bgsoft Well-Known Member Licensed User Longtime User Sep 21, 2016 #4 tufanv said: Isnt it even possible to delete manually an alarm from the app programaticly ? Click to expand... I do not know how, in the Developer Android does not say anything about this question. Sorry I can not help regards Upvote 0
tufanv said: Isnt it even possible to delete manually an alarm from the app programaticly ? Click to expand... I do not know how, in the Developer Android does not say anything about this question. Sorry I can not help regards
Erel B4X founder Staff member Licensed User Longtime User Sep 21, 2016 #5 It is not possible to cancel an intent based alarm. Upvote 0
tufanv Expert Licensed User Longtime User Sep 21, 2016 #6 Do we have any other alarm lib or stg like that for this purpose that i may be missing ? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Sep 21, 2016 #7 You can use StartServiceAt to create an alarm (better option: https://www.b4x.com/android/forum/t...estartatexact-not-accurate.65117/#post-412286 ) Upvote 0
You can use StartServiceAt to create an alarm (better option: https://www.b4x.com/android/forum/t...estartatexact-not-accurate.65117/#post-412286 )