public String exportFavorites(File f) {
   GPXFile gpx = new GPXFile();
   for (FavouritePoint p : getFavorites().getFavouritePoints()) {
     if (p.isStored()) {
       WptPt pt = new WptPt();
       pt.lat = p.getLatitude();
       pt.lon = p.getLongitude();
       pt.name = p.getName() + "_" + p.getCategory();
       gpx.points.add(pt);
     }
   }
   return GPXUtilities.writeGpxFile(f, gpx, this);
 }
 public void setGpxFileToDisplay(GPXFile gpxFileToDisplay, boolean showCurrentGpxFile) {
   this.gpxFileToDisplay = gpxFileToDisplay;
   osmandSettings.SHOW_CURRENT_GPX_TRACK.set(showCurrentGpxFile);
   if (gpxFileToDisplay == null) {
     getFavorites().setFavoritePointsFromGPXFile(null);
   } else {
     List<FavouritePoint> pts = new ArrayList<FavouritePoint>();
     for (WptPt p : gpxFileToDisplay.points) {
       FavouritePoint pt = new FavouritePoint();
       pt.setLatitude(p.lat);
       pt.setLongitude(p.lon);
       if (p.name == null) {
         p.name = "";
       }
       pt.setName(p.name);
       pts.add(pt);
     }
     gpxFileToDisplay.proccessPoints();
     getFavorites().setFavoritePointsFromGPXFile(pts);
   }
 }