TheSketchees Member Licensed User Longtime User Feb 16, 2015 #1 I require to create a service which will be able to play MP3 sounds at certain times. I would like the service to be running when i click say "start" on my Activity and stop when i click "Stop". Would this be possible. Just want to be sure so the OS will not close it. I would like it to be like a timer which on tick if the clock is 12:00:50 to play the sounds then. BTW i have NEVER worked with services. I am creating this for work so we can replace the guys on the desk clicking the buttons to say stuff like "People wearing orange wrist bands please leave the trampoline area". Thanks, Alex Edit: DM worked out how to use services. Last edited: Feb 16, 2015
I require to create a service which will be able to play MP3 sounds at certain times. I would like the service to be running when i click say "start" on my Activity and stop when i click "Stop". Would this be possible. Just want to be sure so the OS will not close it. I would like it to be like a timer which on tick if the clock is 12:00:50 to play the sounds then. BTW i have NEVER worked with services. I am creating this for work so we can replace the guys on the desk clicking the buttons to say stuff like "People wearing orange wrist bands please leave the trampoline area". Thanks, Alex Edit: DM worked out how to use services.
Erel B4X founder Staff member Licensed User Longtime User Feb 17, 2015 #2 You have two options (and you can choose both of them): 1. Call Service.StartForeground to tell the OS that you want to keep the service running. 2. Use StartServiceAt to schedule your service to start at the next required time. Upvote 0
You have two options (and you can choose both of them): 1. Call Service.StartForeground to tell the OS that you want to keep the service running. 2. Use StartServiceAt to schedule your service to start at the next required time.