alarm update

Fox

Active Member
Licensed User
Longtime User
hey guys the solution that erel said is not really working for me. or im to bad . anyone have just an little example for simply alarm system.. just an input for hours after the time the phone get an alarm...
 

susu

Well-Known Member
Licensed User
Longtime User
I don't write Alarm app but I think the alarm system works like this:
1. Main activity get the alarm time. You calculate when the alarm will fire and schedule alarm service auto start at that moment.
2. When alarm service started, it re-schedule itself on next time (if got any).

Here some codes. Hope you find it useful.

* Main Activity


* AutoAlarm service

Sub Service_Start
StartServiceAt("", DateTime.Now + (yyyy * 60 * 1000), True) ' Re-schedule to start itself on next yyyy minute
PlayAlarm
End Sub

Sub PlayAlarm
Mp.Load(File.DirAssets, "sound.wav")
Mp.Play
End Sub
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…