public class Variable
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
addLocalMap(MyMap localMap)
add a map to local map list
|
void |
addLocalMaps(java.util.List<MyMap> localMaps)
add a list of maps to localMaps
|
void |
addRecentDownloadedMap(MyMap myMap) |
java.util.List<MyMap> |
getCloudMaps() |
android.content.Context |
getContext() |
java.lang.String |
getCountry() |
java.lang.String |
getDirectionsON() |
int |
getDownloadStatus() |
org.mapsforge.core.model.LatLong |
getLastLocation() |
int |
getLastZoomLevel() |
java.util.List |
getLocalMapNameList() |
java.util.List<MyMap> |
getLocalMaps() |
java.lang.String |
getMapDirectory() |
int |
getMapFinishedPercentage() |
java.lang.String |
getMapLastModified() |
java.lang.String |
getMapName() |
java.io.File |
getMapsFolder() |
java.lang.String |
getMapUrlList() |
java.lang.String |
getPausedMapName() |
java.util.List<MyMap> |
getRecentDownloadedMaps() |
java.lang.String |
getRoutingAlgorithms() |
int |
getSportCategoryIndex() |
java.lang.String |
getTrackingDirectory() |
java.io.File |
getTrackingFolder() |
java.lang.String |
getTravelMode() |
static Variable |
getVariable() |
java.lang.String |
getWeighting() |
int |
getZoomLevelMax() |
int |
getZoomLevelMin() |
boolean |
isAdvancedSetting() |
boolean |
isDirectionsON() |
boolean |
isPrepareInProgress() |
boolean |
loadVariables()
run when app open at run time
load variables from saved file
|
java.lang.String |
readFile() |
void |
removeLocalMap(MyMap localMap) |
MyMap |
removeRecentDownloadedMap(int index) |
void |
resetDownloadMapVariables() |
boolean |
saveStringToFile(java.lang.String file) |
boolean |
saveVariables()
run before app destroyed at run time
save variables to local file (json) @return true is succeed, false otherwise
|
void |
setAdvancedSetting(boolean advancedSetting) |
void |
setCloudMaps(java.util.List<MyMap> cloudMaps) |
void |
setContext(android.content.Context context) |
void |
setCountry(java.lang.String country) |
void |
setDirectionsON(boolean directionsON) |
void |
setDownloadStatus(int downloadStatus) |
void |
setLastLocation(org.mapsforge.core.model.LatLong lastLocation) |
void |
setLastZoomLevel(int lastZoomLevel) |
void |
setLocalMaps(java.util.List<MyMap> localMaps) |
void |
setMapDirectory(java.lang.String mapDirectory) |
void |
setMapFinishedPercentage(int mapFinishedPercentage) |
void |
setMapLastModified(java.lang.String mapLastModified) |
void |
setMapsFolder(java.io.File mapsFolder) |
void |
setPausedMapName(java.lang.String pausedMapName) |
void |
setPrepareInProgress(boolean prepareInProgress) |
void |
setRecentDownloadedMaps(java.util.List<MyMap> recentDownloadedMaps) |
void |
setRoutingAlgorithms(java.lang.String routingAlgorithms) |
void |
setSportCategoryIndex(int sportCategoryIndex) |
void |
setTrackingFolder(java.io.File trackingFolder) |
void |
setTravelMode(java.lang.String travelMode) |
void |
setWeighting(java.lang.String weighting) |
void |
setZoomLevelMax(int zoomLevelMax) |
void |
setZoomLevelMin(int zoomLevelMin) |
void |
setZoomLevels(int zoomLevelMax,
int zoomLevelMin) |
public void resetDownloadMapVariables()
public static Variable getVariable()
public java.lang.String getMapName()
public java.lang.String getMapUrlList()
public java.lang.String getTravelMode()
public void setTravelMode(java.lang.String travelMode)
public java.lang.String getWeighting()
public void setWeighting(java.lang.String weighting)
public java.lang.String getRoutingAlgorithms()
public void setRoutingAlgorithms(java.lang.String routingAlgorithms)
public boolean isAdvancedSetting()
public void setAdvancedSetting(boolean advancedSetting)
public boolean isDirectionsON()
public void setDirectionsON(boolean directionsON)
public java.lang.String getDirectionsON()
public int getZoomLevelMax()
public void setZoomLevelMax(int zoomLevelMax)
public int getZoomLevelMin()
public void setZoomLevelMin(int zoomLevelMin)
public void setZoomLevels(int zoomLevelMax, int zoomLevelMin)
zoomLevelMax
- max zoom levelzoomLevelMin
- min zoom levelpublic int getLastZoomLevel()
public void setLastZoomLevel(int lastZoomLevel)
public org.mapsforge.core.model.LatLong getLastLocation()
public void setLastLocation(org.mapsforge.core.model.LatLong lastLocation)
public java.lang.String getMapDirectory()
public java.lang.String getTrackingDirectory()
public void setMapDirectory(java.lang.String mapDirectory)
public java.lang.String getCountry()
public void setCountry(java.lang.String country)
public java.io.File getMapsFolder()
public void setMapsFolder(java.io.File mapsFolder)
public java.io.File getTrackingFolder()
public void setTrackingFolder(java.io.File trackingFolder)
public android.content.Context getContext()
public void setContext(android.content.Context context)
public boolean isPrepareInProgress()
public void setPrepareInProgress(boolean prepareInProgress)
public java.util.List<MyMap> getLocalMaps()
public int getDownloadStatus()
public void setDownloadStatus(int downloadStatus)
public int getMapFinishedPercentage()
public void setMapFinishedPercentage(int mapFinishedPercentage)
public java.lang.String getMapLastModified()
public void setMapLastModified(java.lang.String mapLastModified)
public java.lang.String getPausedMapName()
public void setPausedMapName(java.lang.String pausedMapName)
public void addLocalMaps(java.util.List<MyMap> localMaps)
localMaps
- list of mapspublic void addLocalMap(MyMap localMap)
localMap
- MyMappublic void removeLocalMap(MyMap localMap)
public void setLocalMaps(java.util.List<MyMap> localMaps)
public java.util.List getLocalMapNameList()
public java.util.List<MyMap> getRecentDownloadedMaps()
public void addRecentDownloadedMap(MyMap myMap)
public MyMap removeRecentDownloadedMap(int index) throws java.lang.Exception
java.lang.Exception
public void setRecentDownloadedMaps(java.util.List<MyMap> recentDownloadedMaps)
public java.util.List<MyMap> getCloudMaps()
public void setCloudMaps(java.util.List<MyMap> cloudMaps)
public int getSportCategoryIndex()
public void setSportCategoryIndex(int sportCategoryIndex)
public boolean loadVariables()
public boolean saveVariables()
public java.lang.String readFile()
public boolean saveStringToFile(java.lang.String file)
file
- a string need to be saved