use of com.peterlaurence.trekadvisor.core.map.gson.MarkerGson in project TrekAdvisor by peterLaurence.
the class MapMarkerImportTask method doInBackground.
@Override
protected Void doInBackground(Void... params) {
File markerFile = new File(mMap.getDirectory(), MapLoader.MAP_MARKER_FILE_NAME);
if (!markerFile.exists())
return null;
String jsonString;
try {
jsonString = FileUtils.getStringFromFile(markerFile);
MarkerGson markerGson = mGson.fromJson(jsonString, MarkerGson.class);
mMap.setMarkerGson(markerGson);
} catch (Exception e) {
/* Error while decoding the json file */
Log.e(TAG, e.getMessage(), e);
}
return null;
}
Aggregations