birnesoft Active Member Licensed User Longtime User Jan 15, 2018 #1 The service starts at boot,... servicemodule: getdata B4X: #Region Service Attributes #StartAtBoot: True #End Region but when I close the App the service doesn't start. main B4X: Sub Activity_Pause (UserClosed As Boolean) StartService(getdata) End Sub how can I start the service when I close the App?? greetings Björn Last edited: Jan 16, 2018
The service starts at boot,... servicemodule: getdata B4X: #Region Service Attributes #StartAtBoot: True #End Region but when I close the App the service doesn't start. main B4X: Sub Activity_Pause (UserClosed As Boolean) StartService(getdata) End Sub how can I start the service when I close the App?? greetings Björn
Erel B4X founder Staff member Licensed User Longtime User Jan 15, 2018 #2 Please use [code]code here...[/code] tags when posting code. Upvote 0
birnesoft Active Member Licensed User Longtime User Jan 18, 2018 #3 When I start the service while the program is running. The service ends, when I close the app. How it will be run further? Upvote 0
When I start the service while the program is running. The service ends, when I close the app. How it will be run further?
Peter Simpson Expert Licensed User Longtime User Jan 18, 2018 #4 Try using StartServiceAtExact, or better still look at this post https://www.b4x.com/android/forum/t...estartatexact-not-accurate.65117/#post-412286 Upvote 0
Try using StartServiceAtExact, or better still look at this post https://www.b4x.com/android/forum/t...estartatexact-not-accurate.65117/#post-412286