M Markos Well-Known Member Licensed User Longtime User Mar 27, 2017 #1 Hi All There are aspects of B4X I have not yet found a use as yet. The Service module. Can some explain when and why to use this feature. I can assume it isnto run methods or events as a background process. If that is the case Im wondering what are the benefits of using a usual module using timer events?
Hi All There are aspects of B4X I have not yet found a use as yet. The Service module. Can some explain when and why to use this feature. I can assume it isnto run methods or events as a background process. If that is the case Im wondering what are the benefits of using a usual module using timer events?
DonManfred Expert Licensed User Longtime User Apr 14, 2017 #21 FHEBERT said: I think my problem is Doze. Click to expand... i Aggree Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Apr 14, 2017 #22 You should call Service.StartForeground if you want your service to always run in the background. Upvote 0
FHEBERT Member Licensed User Longtime User Apr 14, 2017 #23 Erel said: You should call Service.StartForeground if you want your service to always run in the background. Click to expand... Thanks Erel. What is the best option in my use case ? My service connects to a server every 5 seconds. Use a timer and let the service running, or Start/Stop the service every 5 seconds with StartServiceAt and StopService? Upvote 0
Erel said: You should call Service.StartForeground if you want your service to always run in the background. Click to expand... Thanks Erel. What is the best option in my use case ? My service connects to a server every 5 seconds. Use a timer and let the service running, or Start/Stop the service every 5 seconds with StartServiceAt and StopService?
Erel B4X founder Staff member Licensed User Longtime User Apr 16, 2017 #24 You should never post questions in existing threads. Please start a new thread for this. Upvote 0