diff --git a/LocationLib/bin/locationlib.jar b/LocationLib/bin/locationlib.jar index 0b57fc4..db83dc2 100644 Binary files a/LocationLib/bin/locationlib.jar and b/LocationLib/bin/locationlib.jar differ diff --git a/LocationLib/src/com/TwentyCodes/android/SkyHook/SkyHookService.java b/LocationLib/src/com/TwentyCodes/android/SkyHook/SkyHookService.java index 0f7ff20..544a292 100644 --- a/LocationLib/src/com/TwentyCodes/android/SkyHook/SkyHookService.java +++ b/LocationLib/src/com/TwentyCodes/android/SkyHook/SkyHookService.java @@ -20,7 +20,6 @@ import android.util.Log; import com.TwentyCodes.android.debug.LocationLibraryConstants; import com.TwentyCodes.android.location.GeoPointLocationListener; -import com.TwentyCodes.android.location.BaseLocationReceiver; import com.google.android.maps.GeoPoint; import com.skyhookwireless.wps.RegistrationCallback; import com.skyhookwireless.wps.WPSContinuation; @@ -38,22 +37,6 @@ import com.skyhookwireless.wps.WPSReturnCode; * @author ricky barrette */ public class SkyHookService extends Service implements GeoPointLocationListener, RegistrationCallback{ - - /** - * Used to tell the service how frequently it needs to run. This is required if you want a multishot service - */ - public static final String INTENT_EXTRA_PERIOD_BETWEEN_UPDATES = "period_beween_updates"; - - /** - * Used to tell the service how accurate of a location you want reported - */ - public static final String INTENT_EXTRA_REQUIRED_ACCURACY = "required_accuracy"; - - /** - * Used to tell the service the update action to broadcast. If this is not supplied, {@link BaseLocationReceiver.INTENT_EXTRA_ACTION_UPDATE } will be used. - * @see BaseLocationReceiver.INTENT_EXTRA_ACTION_UPDATE - */ - public static final String INTENT_EXTRA_ACTION_UPDATE = "action_update"; public static final String TAG = "SkyHookService"; public static final int REQUEST_CODE = 32741942; @@ -178,11 +161,11 @@ public class SkyHookService extends Service implements GeoPointLocationListener, this.mIntent = intent; if(intent != null){ - if (intent.hasExtra(INTENT_EXTRA_PERIOD_BETWEEN_UPDATES)) - mPeriod = intent.getLongExtra(INTENT_EXTRA_PERIOD_BETWEEN_UPDATES, 60000L); + if (intent.hasExtra(LocationLibraryConstants.INTENT_EXTRA_PERIOD_BETWEEN_UPDATES)) + mPeriod = intent.getLongExtra(LocationLibraryConstants.INTENT_EXTRA_PERIOD_BETWEEN_UPDATES, 60000L); - if (intent.hasExtra(INTENT_EXTRA_REQUIRED_ACCURACY)) - mRequiredAccuracy = intent.getIntExtra(INTENT_EXTRA_REQUIRED_ACCURACY, -1); + if (intent.hasExtra(LocationLibraryConstants.INTENT_EXTRA_REQUIRED_ACCURACY)) + mRequiredAccuracy = intent.getIntExtra(LocationLibraryConstants.INTENT_EXTRA_REQUIRED_ACCURACY, -1); } } diff --git a/LocationLib/src/com/TwentyCodes/android/debug/LocationLibraryConstants.java b/LocationLib/src/com/TwentyCodes/android/debug/LocationLibraryConstants.java index 34072af..42e4b33 100644 --- a/LocationLib/src/com/TwentyCodes/android/debug/LocationLibraryConstants.java +++ b/LocationLib/src/com/TwentyCodes/android/debug/LocationLibraryConstants.java @@ -6,6 +6,8 @@ */ package com.TwentyCodes.android.debug; +import com.TwentyCodes.android.location.BaseLocationReceiver; + import android.hardware.SensorManager; import android.location.LocationManager; @@ -58,4 +60,14 @@ public final class LocationLibraryConstants { public static final String INTENT_ACTION_UPDATE = "TwentyCodes.intent.action.LocationUpdate"; public static final String INTENT_EXTRA_LOCATION_CHANGED = LocationManager.KEY_LOCATION_CHANGED; + + /** + * Used to tell the service how frequently it needs to run. This is required if you want a multishot service + */ + public static final String INTENT_EXTRA_PERIOD_BETWEEN_UPDATES = "period_beween_updates"; + + /** + * Used to tell the service how accurate of a location you want reported + */ + public static final String INTENT_EXTRA_REQUIRED_ACCURACY = "required_accuracy"; } \ No newline at end of file diff --git a/LocationLib/src/com/TwentyCodes/android/location/LocationService.java b/LocationLib/src/com/TwentyCodes/android/location/LocationService.java index f903451..8be7829 100644 --- a/LocationLib/src/com/TwentyCodes/android/location/LocationService.java +++ b/LocationLib/src/com/TwentyCodes/android/location/LocationService.java @@ -37,22 +37,6 @@ import com.TwentyCodes.android.debug.LocationLibraryConstants; * @author ricky barrette */ public class LocationService extends Service implements LocationListener { - - /** - * Used to tell the service how frequently it needs to run. This is required if you want a multishot service - */ - public static final String INTENT_EXTRA_PERIOD_BETWEEN_UPDATES = "period_beween_updates"; - - /** - * Used to tell the service how accurate of a location you want reported - */ - public static final String INTENT_EXTRA_REQUIRED_ACCURACY = "required_accuracy"; - - /** - * Used to tell the service the update action to broadcast. If this is not supplied, {@link BaseLocationReceiver.INTENT_EXTRA_ACTION_UPDATE } will be used. - * @see BaseLocationReceiver.INTENT_EXTRA_ACTION_UPDATE - */ - public static final String INTENT_EXTRA_ACTION_UPDATE = "action_update"; public static final String TAG = "LocationService"; private static final int REQUEST_CODE = 7893749; @@ -180,11 +164,11 @@ public class LocationService extends Service implements LocationListener { this.mIntent = intent; - if (intent.hasExtra(INTENT_EXTRA_PERIOD_BETWEEN_UPDATES)) - mPeriod = intent.getLongExtra(INTENT_EXTRA_PERIOD_BETWEEN_UPDATES, 60000L); + if (intent.hasExtra(LocationLibraryConstants.INTENT_EXTRA_PERIOD_BETWEEN_UPDATES)) + mPeriod = intent.getLongExtra(LocationLibraryConstants.INTENT_EXTRA_PERIOD_BETWEEN_UPDATES, 60000L); - if (intent.hasExtra(INTENT_EXTRA_REQUIRED_ACCURACY)) - mRequiredAccuracy = intent.getIntExtra(INTENT_EXTRA_REQUIRED_ACCURACY, -1); + if (intent.hasExtra(LocationLibraryConstants.INTENT_EXTRA_REQUIRED_ACCURACY)) + mRequiredAccuracy = intent.getIntExtra(LocationLibraryConstants.INTENT_EXTRA_REQUIRED_ACCURACY, -1); } /**