corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » Any Android/Java guru's on here? » Post Reply

Post Reply
Who Can Post? All users can post new topics and all users can reply.
Icon:
Formatting Mode:
Normal
Advanced
Help

Insert Bold text Insert Italicized text Insert Underlined text Insert Centered text Insert a Hyperlink Insert Email Hyperlink Insert an Image Insert Code Formatted text Insert Quoted text
Message:
HTML is Off
Smilies are On
BB Code is On
[img] Code is On
Post Options: Disable smileys?
Turn BBCode off?
Receive email notification of new replies?

DaveyLC

posted on 29th Apr 15 at 16:43

I think I've found a decent solution with the service.. It needs a bit more testing but fingers crossed its the right answer :)


Dom

posted on 29th Apr 15 at 16:16

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

posted on 29th Apr 15 at 16:03

Got very little decent detail from there regarding the WakefulBroadcastReceiver, even the official Android site is thin on the ground.


Dom

posted on 29th Apr 15 at 15:58

stackoverflow.com ;)


pow

posted on 29th Apr 15 at 08:01

What you've just said to me is blah blah blah blah geek haxor blah blah :D


DaveyLC

posted on 29th Apr 15 at 07:22

Bah!! What no proper geeks on here? :D

Ended up using a Service and its working quite nicely in testing.


DaveyLC

posted on 28th Apr 15 at 08:56

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 ]? :)