Android Question I issue a StartServiceAt() and in the meanwhile the running App is killed.

tigrot

Well-Known Member
Licensed User
Longtime User
I start a StartServiceAt() with a period of 60 minutes. Expecially during the night, the running App is killed and the Service is never started. I was thinking that StartServiceAt() was enough to keep the App running. Have I to keep some service foreground to succede in this job?
Thank you for time!
Mauro
 

tigrot

Well-Known Member
Licensed User
Longtime User
Try StartServiceAtExact and make sure that DuringSleep is set to true.

Not all devices will let you run in the background.
Hi Erel, tried this solution, but no success. I'll try to keep a foreground service running. The App waits for an hour during the day and shows UI interfacce. The user confirms with the click of a button and it waits again. During the night the UI is not shown and the wait automaticaly restarted, in the morning after 9:00 the app is not working any more.
Regards
Mauro
 
Last edited:
Upvote 0
Top