corsasport.co.uk
 

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


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author Any Android/Java guru's on here?
DaveyLC
Member

Registered: 8th Oct 08
Location: Berkshire
User status: Offline
28th Apr 15 at 08:56   View User's Profile U2U Member Reply With Quote

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
29th Apr 15 at 07:22   View User's Profile U2U Member Reply With Quote

Bah!! What no proper geeks on here?

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

Avatar

Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
29th Apr 15 at 08:01   View Garage View User's Profile U2U Member Reply With Quote

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
29th Apr 15 at 15:58   View User's Profile U2U Member Reply With Quote

stackoverflow.com
DaveyLC
Member

Registered: 8th Oct 08
Location: Berkshire
User status: Offline
29th Apr 15 at 16:03   View User's Profile U2U Member Reply With Quote

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
29th Apr 15 at 16:16   View User's Profile U2U Member Reply With Quote

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
29th Apr 15 at 16:43   View User's Profile U2U Member Reply With Quote

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

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
QR codes Ian Geek Day 14 784
21st Dec 11 at 17:13
by Steve
 
Google tablet. bubble Geek Day 8 1102
28th Jun 12 at 17:55
by Kyle T
 
another phone upgrade topic....... richardworrall Geek Day 38 1251
3rd Aug 12 at 14:28
by A2H GO
 
HTML/Java Geeks - Possible solution? Jambo Geek Day 15 844
9th Apr 14 at 16:01
by JordyCarter
 

Corsa Sport » Message Board » Off Day » Geek Day » Any Android/Java guru's on here? 28 database queries in 0.0142150 seconds