Service recreated after app close

coslad

Well-Known Member
Licensed User
Longtime User
Hi ,

i have a problem , a service is created as sticky service, after 1 second then the app is closed the service is recreated .
The service isn't destroied but only recreated , is this behavior right ?

This behavior causes me some problems, 'cause just before the close of the application , the service is committed to transfer a file via ftp, and recreate the service at that time resets some counters.

is there any solution to prevent the service is automatically created at the exit of application?

Thanks
 

melamoud

Active Member
Licensed User
Longtime User
It sound like the right behavior.
What event or code exit the app?
The intent that passed to the service most likely be different if run from app or sticky...
You can maybe use that. Save each param and in case of sticky run load the parameters and continue the previous run
 
Upvote 0

coslad

Well-Known Member
Licensed User
Longtime User
i use this code to close the app:

B4X:
Activity.Finish
ExitApplication

but why the service is recreated if it is running ?
 
Upvote 0
Top