Android Question Starter Service Still reliable?

Status
Not open for further replies.

Dianzoa

Active Member
Licensed User
Is it still true that starter service ALWAYS run in minimized apps? Android 8 & 9?
 

Dianzoa

Active Member
Licensed User
Yes it does always run not unless the OS shuts it down.
I'm running Android 8, 9 and 10 on devices and as long as you follow Erels basic advice @Dianzoa, in most cases you should not come across any serious issues.
Have You tried to do some repetitive task with a timer in starter? I think it stop functioning after some long time, least than 1 hour or so.
 
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
Have You tried to do some repetitive task with a timer in starter? I think it stop functioning after some long time, least than 1 hour or so.

1. I personally rarely use timers in the starter service (even though that's the best place for them), especially I for that amount of time.
2. What is it you are trying to accomplish.
3. If need be you can use partial lock to help you out (search the forum for partial lock).
4. Respond to question 2.
5. Search the forum for background location tracker.

Enjoy...
 
Upvote 0

Dianzoa

Active Member
Licensed User
1. I personally rarely use timers in the starter service (even though that's the best place for them), especially I for that amount of time.
2. What is it you are trying to accomplish.
3. If need be you can use partial lock to help you out (search the forum for partial lock).
4. Respond to question 2.
5. Search the forum for background location tracker.

Enjoy...
2 - I try lo get gps location every 3 minutes, it works most of the time if the app is active or recently minimized, it stop working after 1 hour or less sometimes. Until the app is resume, the cycle starts again, but definitely not running "all the time". I am still doing some experiments.
5 - It has the same problem after awhile.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

Dianzoa

Active Member
Licensed User
I can say that the timer in starter service in android 9 works as expected. From 10AM to 9PM, the timer triggers the event and do the location update to the DB.
I will tray on android 8 tomorrow. I will expand the time though from 3 minutes to 15 minutes, to avoid battery issues.
 
Upvote 0

Dianzoa

Active Member
Licensed User
The timer will run until the process is killed. The starter service will not prevent the process from being killed.
In Android 8, after a few hours the starter timer no longer works. And the foreground service stops, if I got the app in the foreground from minimized state, it works again, in android 9 the foreground service never stops, works ok at least for 12 hours, not the same case in android 8 :(

I have to test some other way around to see if it works like android 9
 
Upvote 0

Dianzoa

Active Member
Licensed User
You are confusing different things. As I wrote above, the starter service will remain "alive" until the process is killed. It will not prevent the process from being killed.

If you have a question about background features then you should start a new thread as it is not related to the starter service.
Got it! But if the process is killed, all services are gone? If my phone is android 8 and is connected to debugging, (charging), works ok, in real life, unplugged, stop working in less than an hour, the same code works for at least 12 hours in android 9, there is some big differences?
In terms of the Starter Service?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
But if the process is killed, all services are gone?
Yes and it has nothing with the starter service.

In terms of the Starter Service?
It has nothing to do with the starter service.

This thread is closed as the question in the first post was answered several times. For further discussion start a new thread.
 
Upvote 0
Status
Not open for further replies.
Top