Locus Map - forum

Support => Troubles & Questions => Topic started by: Christian on October 29, 2013, 18:02:01

Title: parking: how does it works?
Post by: Christian on October 29, 2013, 18:02:01
Hi @all,
this is another question only.

i use Locus on my Galaxy Note and always try to avoid too much consumption of power. For long day tours i often leave the additional power pack at home, but ist's risky.
Using the funktion "parking" does start a process ? Do this need any additional ressources?

Thanx for an answer,
Christian
Title: Re: parking: how does it works?
Post by: Menion on October 30, 2013, 14:23:53
Hello Christian,
  parking is quite battery-friendly service. There only run small thread that periodically check if alarm should be played, nothing more. Anyway I never tested parking separately, so you may try it on your own. Just start parking over night and you'll see in any app that measure consumption.
Title: Re: parking: how does it works?
Post by: Christian on October 30, 2013, 14:27:37
Great. I will test it.
Does the periodically check mean that there is no calculation of distance to the parking place or other thread / processor time?
Thanx,
Christian
Title: Re: parking: how does it works?
Post by: Menion on October 30, 2013, 14:30:04
I'm checking code (rather) and there is once per second one compute of distance and one compare of times, which is really really easy task for processor.
Title: Re: parking: how does it works?
Post by: tommi on October 30, 2013, 19:06:10
Quote from: menion on October 30, 2013, 14:30:04
I'm checking code (rather) and there is once per second one compute of distance and one compare of times, which is really really easy task for processor.
Once per second?
When shall the phone goto deep sleep?
Title: Re: parking: how does it works?
Post by: Menion on October 30, 2013, 19:07:06
hmm good question ...

Sent from my Nexus 7 using Tapatalk

Title: Re: parking: how does it works?
Post by: tommi on October 30, 2013, 19:15:06
Quote from: menion on October 30, 2013, 19:07:06
hmm good question ...

Sent from my Nexus 7 using Tapatalk
:)
Title: Re: parking: how does it works?
Post by: Menion on October 31, 2013, 11:25:11
hmm I'm thinking about it

1. I confirm that parking service run own thread that check time and distance because of notifications
2. but, this simple thread do not block device from sleep. When device want to sleep, it's not a problem
3. to prevent device sleep is used method called "Wake lock" and it is not this case
4. unfortunately, when device go to sleep, it pause for "sleep time" work on this "checker", so notifications should not appear.

When I used and tested parking feature, I always used also some track record or navigation or any other function, so device was awake whole time and notification from parking worked fine. This is anyway very good point and I'm now aware that this functions should be improved, so it should work correctly even when device asleep.