Android Question Starting service at pecified time

Devv

Active Member
Licensed User
Longtime User
Hi

how can i start a service a specified time for example at 3 am every day
then it will do some stuff then destroy itself .
the next day it will relaunch at 3 am do the stuff then destroy it self
and so on for everyday ...
 

mangojack

Well-Known Member
Licensed User
Longtime User
See this thread Here ...

basically ..
B4X:
Sub Service_Start (StartingIntent As Intent)
  ScheduleNextServiceStart(3,0)

  'Do some stuff .............

  StopService("")

End Sub

Sub ScheduleNextServiceStart(Hours As Int, Minutes As Int)
  'see above thread for code ...
End Sub
 
Upvote 0
Top