Android Question WakeUp service doesn´t work on a Samsung Galaxy S5

Bob Spielen

Active Member
Licensed User
Im using a WakeUp service with the function :

B4X:
If P.SdkVersion > 18 Then StartServiceAtExact(despertador, (DateTime.Now) , True) Else StartServiceAt(despertador,(DateTime.Now),True)

On many phones, it works perfectly. On a Samsung Galaxy S5, does not work!
Does anyone have an idea of what could be happening!
In advance I thank you for the help.
 

Bob Spielen

Active Member
Licensed User
You can use StartServiceAtExact on all versions of Android.
Mr. Erel, first ..thanks a lot for the reply.
Im not sure if I understood when should I start a service in the foreground mode.... In this case of a long term (4days) wake up service should I use Service.AUTOMATIC_FOREGROUND_WHEN_NEEDED , Service.AUTOMATIC_FOREGROUND_NEVER (with Pw.PartialLock) or Service.AUTOMATIC_FOREGROUND_ALWAYS (so OS will not kill and then using Service.StopAutomaticForeground by the end of the service...) ?
In advance thank you very much!
 
Upvote 0
Top