I'm not sure I understand what you're saying.
If I force close an app, all traces of it seems to be gone. (If I bring up the UI again where I can force close it, the button is disabled - so it's actually showing if the app is around or not.)
If I swipe-kill an app it seems to be in a sort of half-closed state (like you described in your post I mentioned initially, I suppose). It's gone, but if I bring up the UI where I force close the app, it's possible to do so - the button is enabled.
So there seems to be a difference between swiping and force closing. And I'm not sure what you mean by "clicking the app icon"?
Here's a part of my log. The first part is me starting the app after a fresh install, so nothing old in memory.
STARTING APP: Service_Create ================== 2017-09-27 21:33:52
GENERIC: 1
** Service (starter) Start **
*** Service (httputils2service) Create ***
** Service (httputils2service) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
GENERIC: 1
** Service (httputils2service) Start **
GENERIC: 2
GENERIC: 2
** Activity (main) Pause, UserClosed = false **
** Activity (actworking) Create, isFirst = true **
** Activity (actworking) Resume **
GENERIC: 1
** Service (httputils2service) Start **
GENERIC: 2
** Activity (actworking) Pause, UserClosed = false **
*** Service (starter) Create ***
...and now I've put it in the background and swipe-killed it, and this gets added to the log instantly, before I even start the app again...
STARTING APP: Service_Create ================== 2017-09-27 21:34:11
GENERIC: 1
** Service (starter) Start **
** Service (starter) Start **
sending message to waiting queue (CallSubDelayed - SubmitJob)
...and if I now launch the app again, this is logged...
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
GENERIC: 1
sending message to waiting queue (CallSubDelayed - SubmitJob)
** Service (httputils2service) Start **
I noticed that the
httputils2service wasn't started after the swipe-kill, so the last line in the log above is actually from an added
StartService(HttpUtils2Service) first in my
genericRequest - it did no difference.
And I forgot to mention that I have enabled android.app.Service.START_STICKY in my Starter:
#Region Service Attributes
#StartAtBoot: False
#ExcludeFromLibrary: True
#StartCommandReturnValue: android.app.Service.START_STICKY
#End Region
Something else I forgot to mention: I'm not using the standard library for OkHttpUtils2. I needed the actual status code returned from the server so I had to adjust it according to your instructions in another post here in the forum. (
Wish)