N nicieri Active Member Licensed User Longtime User Nov 23, 2017 #1 Hi, I need some help with my Service.. This service is working great.. but when the device go to sleep, my service is stopped. When the screen unlock and wakeup the phone, my service continue.. I have the DuringSleep to "true",.. StartServiceAt("", DateTime.Now + 60 * 1000, True) So.. What can I do? Thanks
Hi, I need some help with my Service.. This service is working great.. but when the device go to sleep, my service is stopped. When the screen unlock and wakeup the phone, my service continue.. I have the DuringSleep to "true",.. StartServiceAt("", DateTime.Now + 60 * 1000, True) So.. What can I do? Thanks
E edgar_ortiz Active Member Licensed User Longtime User Nov 23, 2017 #2 Hi, Did you have a "partial lock"? B4X: Sub Process_Globals 'These global variables will be declared once when the application starts. 'These variables can be accessed from all modules. Dim PWS As PhoneWakeState End Sub Sub Service_Create ' PWS.PartialLock ' '... TO DO End Sub Upvote 0
Hi, Did you have a "partial lock"? B4X: Sub Process_Globals 'These global variables will be declared once when the application starts. 'These variables can be accessed from all modules. Dim PWS As PhoneWakeState End Sub Sub Service_Create ' PWS.PartialLock ' '... TO DO End Sub
N nicieri Active Member Licensed User Longtime User Nov 24, 2017 #3 I will try, Thank you very much. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Nov 24, 2017 #4 Also call Service.StartForeground. Upvote 0