Android Question how can I start a service, when the user closes the app?

birnesoft

Active Member
Licensed User
Longtime User
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:

birnesoft

Active Member
Licensed User
Longtime User
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
Top