ciprig / little-fluffy-location-library

Automatically exported from code.google.com/p/little-fluffy-location-library
0 stars 0 forks source link

InitialiseLibrary with AlarmFrequency Parameters #27

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hey, 

Let me start of with: "This Library is uber awesome" and I'd love to get some 
help from you with this. 

I've set up the LocationLibrary as specified using: 

public static void initialiseLibrary(final Context context, final long 
alarmFrequency, final int locationMaximumAge, final boolean 
broadcastEveryLocationUpdate, final String broadcastPrefix) 

I setup the receiver with intent-filter as expected
I ensured the Library is working correctly - the locationInfo object is showing 
and the location accuracy is fine.

I expected the Location Update to run on AlarmFrequency (5minutes - 300000ms) - 
instead it kept on updating every 90sec or so. 

I tried both v15 and v17. WIth default 
LocationLibrary.initialiseLibrary(context, prefix) i gives me constant updates 
as well - no alarm frequency happening anywhere... 

I'm using 4.4 (Nexus7) and L (Nexus4) on my devices. I was also wondering 
whether it's possible to broadcast the location even if it haven't changed ? 

Original issue reported on code.google.com by zawadzki...@gmail.com on 11 Dec 2014 at 6:07

GoogleCodeExporter commented 9 years ago
Ok, so I decided not to go with jar this time and use the v17 source files. 
- I changed alarmFrequency to public so I can change the interval with 
stopAlarmAndListener, 
- I initialize LocationLibrary in my App class with simple (context, prefix)
- I added sendBroadcast when "No new Location found"

So far - it works as expected :)

Original comment by zawadzki...@gmail.com on 15 Dec 2014 at 4:46