Android Question httputils2service stop?

LucaMs

Expert
Licensed User
My app and I are going crazy :confused::)

I have compiled and then run an application while the device "was on" the lock screen.

Here, the log:
** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Service (httputils2service) Create **
** Service (httputils2service) Start **
** Activity (actsplashscreen) Create, isFirst = true **
** Activity (actsplashscreen) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (actlogin) Create, isFirst = true **
** Activity (actlogin) Resume **
Killing previous instance (main).
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
** Activity (actlogin) Pause, UserClosed = false **
** Activity (actlogin) Pause, UserClosed = false **
** Activity (actlogin) Pause, UserClosed = false **
** Activity (actlogin) Pause, UserClosed = false **
** Activity (actlogin) Pause, UserClosed = false **
** Activity (actlogin) Resume **
** Activity (actlogin) Pause, UserClosed = true **
User Name:
PW:
Nick Name:
Email:
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
Killing previous instance (actlogin).
** Activity (actlogin) Create, isFirst = false **
** Activity (actlogin) Resume **
** Activity (actlogin) Pause, UserClosed = false **
Killing previous instance (main).
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (actlogin) Resume **
Object context is paused. Ignoring CallSubDelayed: JobDone
** Activity (actlogin) Pause, UserClosed = false **
Killing previous instance (main).
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (actlogin) Resume **
Object context is paused. Ignoring CallSubDelayed: JobDone
** Activity (actlogin) Pause, UserClosed = false **
Killing previous instance (main).
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (actlogin) Resume **
Object context is paused. Ignoring CallSubDelayed: JobDone
** Activity (actlogin) Pause, UserClosed = false **
Killing previous instance (main).
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (actlogin) Resume **
Object context is paused. Ignoring CallSubDelayed: JobDone
** Activity (actlogin) Pause, UserClosed = false **
Killing previous instance (main).
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (actlogin) Resume **
Object context is paused. Ignoring CallSubDelayed: JobDone
** Activity (actlogin) Pause, UserClosed = false **
Killing previous instance (main).
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (actlogin) Resume **
Object context is paused. Ignoring CallSubDelayed: JobDone
** Activity (actlogin) Pause, UserClosed = false **
Killing previous instance (main).
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (actlogin) Resume **
Object context is paused. Ignoring CallSubDelayed: JobDone
** Service (starter) Destroy **
** Activity (actlogin) Pause, UserClosed = true **



I know that you will not read it and that without seeing the project is difficult to understand.

But I wonder: ONE of the problems seems to be the fact that the service httputils2service never stops.
I repeat, this is not the main problem, definitely.


Suggestion:
Use a single Activity, if you can, and avoid events as much as possible! :)
 

lemonisdead

Well-Known Member
Licensed User
Ah ? This does not work anymore ?
B4X:
If Not(IsPaused(HttpUtils2Service)) Then
 StopService(HttpUtils2Service)
End If
I'll have to try again. Sorry so
 
Upvote 0

LucaMs

Expert
Licensed User
This is the mad part of the project (I could do all this in the Main Activity, but I would reuse the two Activities)

upload_2016-2-22_15-12-2.png
 
Upvote 0

LucaMs

Expert
Licensed User
Because your app is paused. Why not manage the Job return in a Service's ? It could still run when the lock screen is active

I'm not sure of what is the problem... I fear that it is not only that service... but the problem should "born" only when I compile and install the app; the user cannot start my app while his device is paused ;)


Thank you
 
Upvote 0

lemonisdead

Well-Known Member
Licensed User
the user cannot start my app while his device is paused ;)
Yes but when the lock screen is active, the job's returns into the sleeping activity :)
I let you make your researches and return to mine. Good afternoon dear Luca
 
Upvote 0
Top