S Steve Addy Member Licensed User Longtime User Feb 20, 2019 #1 I'm writing a timelapse app using a foreground service to keep the process running and all is fine until the display "goes to sleep". When the Main Activity is re-awakened by a CallSubDelayed from my foreground service, there is no response from the line "Wait For Camera_SurfaceReady" in "Private Sub CreateSurface" in CamEX2 Is there any solution for this problem when the display has gone to sleep?
I'm writing a timelapse app using a foreground service to keep the process running and all is fine until the display "goes to sleep". When the Main Activity is re-awakened by a CallSubDelayed from my foreground service, there is no response from the line "Wait For Camera_SurfaceReady" in "Private Sub CreateSurface" in CamEX2 Is there any solution for this problem when the display has gone to sleep?
Erel B4X founder Staff member Licensed User Longtime User Feb 21, 2019 #2 Run the Camera2 example. Click on the home button and then back to the app. Does the camera work? Upvote 0
S Steve Addy Member Licensed User Longtime User Feb 21, 2019 #3 Camera2 worked okay. I solved my timelapse app problem by setting PhoneWakeState.KeepAlive in Main. Upvote 0