Hello everybody!
I just want play sound in every 5min.
This is my code, but it is not work in sleep mode.
excuse me for my bad english
P.S.
It is not important play sound exactly 5 min. +2min or -2min is not problem.
I just want play sound in every 5min.
This is my code, but it is not work in sleep mode.
B4X:
Sub Process_Globals
Dim tmr As Timer
Dim aud As MediaPlayer
End Sub
Sub Service_Start (StartingIntent As Intent)
aud.Initialize()
aud.Load(File.DirAssets,"audio.wav")
aud.SetVolume(1,1)
tmr.Initialize("tmr",5 * 60 * 1000)
tmr.Enabled=True
End Sub
Sub tmr_Tick
aud.Play
End Sub
excuse me for my bad english
P.S.
It is not important play sound exactly 5 min. +2min or -2min is not problem.
Last edited: