Question: is ' normal that the app is still present in :
- Settings
- Applications
- Manage application
- Downloaded
and then there is the possibility to do a "Force Stop" (the button "Force Stop" is on the left of button "Uninstall") ?
I read what he says Agraham :
This is the code that I use to close my app (with many Activity)
Apparently everything seems OK but if you relaunch the app it has an unexpected behavior, and I understand that the app was just ... sleeping .
This is not satisfactory !
If, however, I do a "Force Stop" and restart the app works just the way I want .
I came to the conclusion that I have to force a shutdown of the app or (better) to improve the code with which I finish the app.
How could I make ?
Thanks in advance.
- Settings
- Applications
- Manage application
- Downloaded
and then there is the possibility to do a "Force Stop" (the button "Force Stop" is on the left of button "Uninstall") ?
I read what he says Agraham :
Activities consume no CPU time if they are not displayed , and indeed may not exist at all if Android wanted to reclaim Their memory . Services can run in the background but can be destroyed by Android Also Unless You Have Invoked StartForeground Which Means That Android will attempt to keep it running .
This is the code that I use to close my app (with many Activity)
B4X:
Sub Activity_Pause (UserClosed As Boolean)
If FlagEndOfApp = True Then
Log("- debug Close app")
StopService("")
GPS2.GPS1.Stop
StopService("GPS2") ' stop the service [ StartServiceAt("GPS2" , DateTime.Now + Ms , False) ]
CancelScheduledService (GPS2)
StopService("httputils2service")
Main.TW.Flush
Main.TW.Close ' close TextWriter
Main.dbIAH.Close ' close db sqlite
End If
End Sub
Apparently everything seems OK but if you relaunch the app it has an unexpected behavior, and I understand that the app was just ... sleeping .
This is not satisfactory !
If, however, I do a "Force Stop" and restart the app works just the way I want .
I came to the conclusion that I have to force a shutdown of the app or (better) to improve the code with which I finish the app.
How could I make ?
Thanks in advance.