commit
3111d3b93c
1 changed files with 26 additions and 0 deletions
|
@ -92,6 +92,8 @@ public class ExternalApiHelper {
|
||||||
|
|
||||||
public static final String API_CMD_START_GPX_REC = "start_gpx_rec";
|
public static final String API_CMD_START_GPX_REC = "start_gpx_rec";
|
||||||
public static final String API_CMD_STOP_GPX_REC = "stop_gpx_rec";
|
public static final String API_CMD_STOP_GPX_REC = "stop_gpx_rec";
|
||||||
|
public static final String API_CMD_SAVE_GPX = "save_gpx";
|
||||||
|
public static final String API_CMD_CLEAR_GPX = "clear_gpx";
|
||||||
|
|
||||||
public static final String API_CMD_SUBSCRIBE_VOICE_NOTIFICATIONS = "subscribe_voice_notifications";
|
public static final String API_CMD_SUBSCRIBE_VOICE_NOTIFICATIONS = "subscribe_voice_notifications";
|
||||||
public static final int VERSION_CODE = 1;
|
public static final int VERSION_CODE = 1;
|
||||||
|
@ -550,6 +552,30 @@ public class ExternalApiHelper {
|
||||||
plugin.stopRecording();
|
plugin.stopRecording();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (uri.getBooleanQueryParameter(PARAM_CLOSE_AFTER_COMMAND, true)) {
|
||||||
|
finish = true;
|
||||||
|
}
|
||||||
|
resultCode = Activity.RESULT_OK;
|
||||||
|
} else if (API_CMD_SAVE_GPX.equals(cmd)) {
|
||||||
|
OsmandMonitoringPlugin plugin = OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class);
|
||||||
|
if (plugin == null) {
|
||||||
|
resultCode = RESULT_CODE_ERROR_PLUGIN_INACTIVE;
|
||||||
|
finish = true;
|
||||||
|
} else {
|
||||||
|
plugin.saveCurrentTrack();
|
||||||
|
}
|
||||||
|
if (uri.getBooleanQueryParameter(PARAM_CLOSE_AFTER_COMMAND, true)) {
|
||||||
|
finish = true;
|
||||||
|
}
|
||||||
|
resultCode = Activity.RESULT_OK;
|
||||||
|
} else if (API_CMD_CLEAR_GPX.equals(cmd)) {
|
||||||
|
OsmandMonitoringPlugin plugin = OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class);
|
||||||
|
if (plugin == null) {
|
||||||
|
resultCode = RESULT_CODE_ERROR_PLUGIN_INACTIVE;
|
||||||
|
finish = true;
|
||||||
|
} else {
|
||||||
|
app.getSavingTrackHelper().clearRecordedData(true);
|
||||||
|
}
|
||||||
if (uri.getBooleanQueryParameter(PARAM_CLOSE_AFTER_COMMAND, true)) {
|
if (uri.getBooleanQueryParameter(PARAM_CLOSE_AFTER_COMMAND, true)) {
|
||||||
finish = true;
|
finish = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue