I have moved all static keys from individual service classes to
LocationLibraryConstants closes #112 Signed-off-by: Ricky Barrette <rickbarrette@gmail.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user