DaveyLC
Member
Registered: 8th Oct 08
Location: Berkshire
User status: Offline
|
I'm trying to build a class that will allow for the use of a LocationReceiver that will work reliably when the device is asleep..
On iOS this is a pretty simple affair as there is already a service in place to manage this but with Android it appears you have to use a WakeLock (which hammers the battery).
I've tried using a Service that implements LocationReceiver and I've also tried using a BroadcastReceiver that listens for the TIME_TICK broadcast which I then perform a requestSingleLocationUpdate in the onReceive() method.
The WakefulBroadcastReceiver has also come to my attention but the Google documentation isn't actually clear as to what this does!
Any suggestions ]?
|
DaveyLC
Member
Registered: 8th Oct 08
Location: Berkshire
User status: Offline
|
Bah!! What no proper geeks on here?
Ended up using a Service and its working quite nicely in testing.
|
pow
Premium Member
Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
|
What you've just said to me is blah blah blah blah geek haxor blah blah
|
Dom
Member
Registered: 13th Sep 03
User status: Offline
|
stackoverflow.com
|
DaveyLC
Member
Registered: 8th Oct 08
Location: Berkshire
User status: Offline
|
Got very little decent detail from there regarding the WakefulBroadcastReceiver, even the official Android site is thin on the ground.
|
Dom
Member
Registered: 13th Sep 03
User status: Offline
|
Did you stick a thread up?
Usually i get a reply within a day if i need help with something; either that or a mod will point me in the direction of other similar threads.
Otherwise try Androidforums - they've got quite an active development sub-forum.
|
DaveyLC
Member
Registered: 8th Oct 08
Location: Berkshire
User status: Offline
|
I think I've found a decent solution with the service.. It needs a bit more testing but fingers crossed its the right answer
|