@Singleton
public class PreferencesHelper
extends java.lang.Object
Constructor and Description |
---|
PreferencesHelper(android.content.SharedPreferences mSharedPreferences) |
Modifier and Type | Method and Description |
---|---|
boolean |
getCanLocationBeCleared()
Restore the state of "can Location be cleared"
|
int |
getLocationMaxAge() |
int |
getMinAccuracy() |
float |
getMinDistance() |
long |
getMinTime() |
java.lang.String |
getReturnType() |
java.lang.String |
getStopID() |
float |
getStoreCustomDistance() |
float |
getStoredTotalDistance() |
boolean |
isLocationsMappingEnabled() |
boolean |
isServiceStarted() |
void |
restoreProperties()
Restore saved properties from shared preference to the resources
|
boolean |
setIsLocationsMappingEnabled(boolean isEnable) |
boolean |
setIsServiceStarted(boolean isStarted) |
boolean |
setLocationCanBeCleared(java.lang.Boolean state)
Store a key/value in the shared preferences in order to make a state always available.
|
boolean |
setLocationMaxAge(int maxAge) |
boolean |
setMinAccuracy(int minAccuracy) |
boolean |
setMinDistance(float minDistance) |
boolean |
setMinTime(long minTime) |
boolean |
setStopdID(java.lang.String stopdID) |
void |
storeProperties()
Store saved properties from the resources into shared preference
|
boolean |
storeTotalDistance(float distance) |
@Inject public PreferencesHelper(android.content.SharedPreferences mSharedPreferences)
public boolean setLocationCanBeCleared(java.lang.Boolean state)
state
- the state to be stored true/falsepublic boolean setMinTime(long minTime)
public boolean setMinDistance(float minDistance)
public boolean setMinAccuracy(int minAccuracy)
public boolean setLocationMaxAge(int maxAge)
public boolean setStopdID(java.lang.String stopdID)
public boolean setIsServiceStarted(boolean isStarted)
public boolean isServiceStarted()
public boolean setIsLocationsMappingEnabled(boolean isEnable)
public boolean isLocationsMappingEnabled()
public boolean storeTotalDistance(float distance)
public boolean getCanLocationBeCleared()
public java.lang.String getReturnType()
public long getMinTime()
public float getMinDistance()
public int getMinAccuracy()
public int getLocationMaxAge()
public float getStoredTotalDistance()
public float getStoreCustomDistance()
public java.lang.String getStopID()
public void storeProperties()
public void restoreProperties()