Android Question Jobdone after resuming the app

tufanv

Expert
Licensed User
Longtime User
Hello,

My app is using httpjob to get data from the server every second. When the user minimizes the app(pause), jobdone is queued and when the app is resumed, I experience slow start times probably.:

sending message to waiting queue (CallSubDelayed - JobDone)

How can I avoid the jobdone at resume if the datq is requested as soon as the user pauses the app ?

TY
 

tufanv

Expert
Licensed User
Longtime User
The solution is to move the network request to the starter service. This way it will not be paused when the app moves to the background.

However unless the response is large then it will be surprising if it takes more than a few milliseconds to process (you can check it).
this means I will never be able to fix this slow startup problem, I have nothing in my activity_resume , I have seperated my layout to 5 different layouts and load them when needed but still have %27 slow warm and hot start ratio :(
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
that's not what Erel wrote.

How big is the lag you get ?
And do you still get it when you disable the downloads?
 
Upvote 0

tufanv

Expert
Licensed User
Longtime User
The response is bot big, so that is not an issue Erel means.

I am not having long startup time in my device, but others are having so I cant find the issue.
 
Upvote 0
Top