Rummys Blog An world of endless Monday

Monday, 22 August, 2016

wearRoutes more testing

Filed under: World of Warcraft — Andrew.Rowbottom @ 3:25 pm

I’ve been occasionally testing wearRoutes “recording” during my drive in.
I’ve found a number of problems, medical so far all seem to be related to the watch going into “Deep Sleep” which means that the normal way of asking for code to run in e.g. 30 seconds often means it *doesn’t*.
Even when it does run the damn watch will go back to sleep while it’s waiting for some location data and so not get the data it wants.

I’ve worked around the second problem by acquiring a partial_wake_lock – aka forcing the watch to stay awake while it’s waiting for a decent GPS reading. Fortunately it looks like this won’t kill the battery (too much) because a usable location usually arrives within 10 seconds, ampoule meaning the watch can sleep for 20 seconds out of every 30. Not perfect, but not bad either.

The first problem manifests like so…
a) I schedule in some code to run in 30 seconds (this code asks for the Location)
b) The code actually runs anything upto 5 minutes later (varying considerably though usually about 1.5 minutes)

I’m going to have to delve even further into android and use the Alarm Manager — nothing seems to be trivial, or perhaps I’ve covered all the trivial stuff 🙂

Powered by WordPress