Android Question Background service alarm

duneplodder

Active Member
Licensed User
I have B4A app to record, amongst other things, my insulin injections.
I have a separate service based alarm type app. I want this app to alarm at my specified time if I haven't done an injection, but not alarm if I have.

My simplistic approach would be to change a value in a text file & read this from the alarm program.
Is there a better approach?
Thank you.
 

duneplodder

Active Member
Licensed User
Also once an alarm has been set e.g.
StartServiceAt(AlarmServiceID, AlarmTime, True)
How can I read the time which was set?
 
Upvote 0

udg

Expert
Licensed User
Assuming you can define a fix set of times when your service should wake-up to recall you about the action needed, you may make use of a widget to "dismiss" an incoming alarm time.
Since skipping one may turn dangerous, I'd code the widget to open an activity when you confirm you had your insuline. Upon confirmation you dismiss upcoming alarm event and schedule for the next one of the day.
Search the Forum for code from Erel to manage a few times in a row. Found.
 
Last edited:
Upvote 0

duneplodder

Active Member
Licensed User
Hmm I obviously need to read up about widgets! Haven't done much with B4A lately.
I think I get it. When I enter my insulin dose, I should cancel the "alarm service" and reset it for the next day.
Thank you.
 
Upvote 0
Top