Hi Everyone,
Using ReleaseKeepAlive and ReleasePartialLock kills the running service. Any way around this?
The service gets turned off after using the "Release". If I comment out those lines the phone screen is dimmed because the cpu is alive and the service stays alive. The downside is that the screen never goes into sleep mode.
If I press the power button to put the phone into sleep mode, nothing happens in the service.
I hope I can get my cake and eat it as well with a work-around.
Using ReleaseKeepAlive and ReleasePartialLock kills the running service. Any way around this?
B4X:
Sub PlayTheChimes
ntfTheNotification.Notify(2)
pwsPhone.KeepAlive(False)
pwsPhone.PartialLock
mpMediaPlayer.SetVolume(Main.fltVolume, Main.fltVolume)
mpMediaPlayer.Play
End Sub
Sub MediaPlayer_Complete
pwsPhone.ReleaseKeepAlive
pwsPhone.ReleasePartialLock
End Sub
The service gets turned off after using the "Release". If I comment out those lines the phone screen is dimmed because the cpu is alive and the service stays alive. The downside is that the screen never goes into sleep mode.
If I press the power button to put the phone into sleep mode, nothing happens in the service.
I hope I can get my cake and eat it as well with a work-around.
Last edited: