Search in sources :

Example 1 with ASelectedGpxFile

use of net.osmand.aidl.gpx.ASelectedGpxFile in project Osmand by osmandapp.

the class OsmandAidlApi method getActiveGpx.

boolean getActiveGpx(List<ASelectedGpxFile> files) {
    if (files != null) {
        List<SelectedGpxFile> selectedGpxFiles = app.getSelectedGpxHelper().getSelectedGPXFiles();
        String gpxPath = app.getAppPath(IndexConstants.GPX_INDEX_DIR).getAbsolutePath();
        for (SelectedGpxFile selectedGpxFile : selectedGpxFiles) {
            String path = selectedGpxFile.getGpxFile().path;
            if (!Algorithms.isEmpty(path)) {
                if (path.startsWith(gpxPath)) {
                    path = path.substring(gpxPath.length() + 1);
                }
                files.add(new ASelectedGpxFile(path));
            }
        }
        return true;
    }
    return false;
}
Also used : ASelectedGpxFile(net.osmand.aidl.gpx.ASelectedGpxFile) SelectedGpxFile(net.osmand.plus.GpxSelectionHelper.SelectedGpxFile) ASelectedGpxFile(net.osmand.aidl.gpx.ASelectedGpxFile)

Aggregations

ASelectedGpxFile (net.osmand.aidl.gpx.ASelectedGpxFile)1 SelectedGpxFile (net.osmand.plus.GpxSelectionHelper.SelectedGpxFile)1