Interface FavoritesManager


public interface FavoritesManager
MapFactor SDK Favorites module
Since:
1.0
  • Field Details

    • FolderFavoriteDestinations

      static final String FolderFavoriteDestinations
      Recommended folder for favorite navigation destinations
      Since:
      1.0
      See Also:
      Constant Field Values
  • Method Details

    • getFavorites

      void getFavorites(@Nullable String folderName, boolean includeSubFolders, @NonNull FavoritesManager.FavoritesListener listener)
      Get list of favorites in specified folder and possibly its sub folders
      Parameters:
      folderName - folder name. Use null to get favorites from root folder. Sub folders hierarchy is constructed using slashes (e.g. "My places/Nature").
      includeSubFolders - true to include favorites from sub folders, false otherwise
      listener - listener receiving list of favorites from folders meeting specified criteria
      Since:
      1.0
    • addFavorite

      @NonNull FavoritesManager.AddFavoriteResult addFavorite(@NonNull String name, @Nullable String folderName, @NonNull Coordinate coordinate)
      Add new favorite. The name must not contain slash character ("/")
      Parameters:
      name - favorite name
      folderName - folder name. Null to add to root folder
      coordinate - favorite placement
      Returns:
      adding favorite success/failure result
      Since:
      1.0
    • removeFavorite

      boolean removeFavorite(@NonNull Favorite favorite)
      Remove existing favorite
      Parameters:
      favorite - favorite to remove*
      Returns:
      true on success, false when the favorite did not exist