Package com.mapfactor.sdk.favorites
Interface FavoritesManager
public interface FavoritesManager
MapFactor SDK Favorites module
- Since:
- 1.0
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Possible results of FavoritesManager.addFavorite methodstatic interface
Favorites list listener -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Recommended folder for favorite navigation destinations -
Method Summary
Modifier and TypeMethodDescriptionaddFavorite
(String name, String folderName, Coordinate coordinate) Add new favorite.void
getFavorites
(String folderName, boolean includeSubFolders, FavoritesManager.FavoritesListener listener) Get list of favorites in specified folder and possibly its sub foldersboolean
removeFavorite
(Favorite favorite) Remove existing favorite
-
Field Details
-
FolderFavoriteDestinations
Recommended folder for favorite navigation destinations- Since:
- 1.0
- See Also:
-
-
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 otherwiselistener
- 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 namefolderName
- folder name. Null to add to root foldercoordinate
- favorite placement- Returns:
- adding favorite success/failure result
- Since:
- 1.0
-
removeFavorite
Remove existing favorite- Parameters:
favorite
- favorite to remove*- Returns:
- true on success, false when the favorite did not exist
-