MapTrip SDK Android Manual 9.9.7
Favorite Class Reference

The Favorite class stores a list of Wayppoints over the applications lifetime
More...

Static Public Member Functions

static native ApiError addFavorite (Waypoint favorite)
 
static native Iterable< WaypointgetFavoriteIterator ()
 
static native ApiError insertFavoriteAt (Waypoint favorite, int index)
 
static native ApiError removeAll ()
 
static native ApiError removeAt (int index)
 
static native ApiError replaceFavoriteAt (Waypoint favorite, int index)
 

Detailed Description

The user can add or remove waypoints from this structure at all times. Duplicates are allowed. The favorites are persistently stored in the file Favorites.xml

Member Function Documentation

◆ addFavorite()

static native ApiError addFavorite ( Waypoint  favorite)
static

Adds a copy of a favorite at the begin of the favorite list.

Parameters
favoritewaypoint to add
Returns
Errorcode

◆ getFavoriteIterator()

static native Iterable< Waypoint > getFavoriteIterator ( )
static

Returns
iterator of all favorite waypoints

◆ insertFavoriteAt()

static native ApiError insertFavoriteAt ( Waypoint  favorite,
int  index 
)
static

Inserts a copy of a favorite at a given position. If there is already a favorite with this index, the existing favorite is moved to position index + 1.

Parameters
favorite- waypoint to add
index- position in favorite iterator
Returns
Errorcode

◆ removeAll()

static native ApiError removeAll ( )
static

Remove all favorites.

Returns
Errorcode

◆ removeAt()

static native ApiError removeAt ( int  index)
static

Remove the favorite with the given index.

Parameters
index- position in favorite iterator.
Returns
Errorcode

◆ replaceFavoriteAt()

static native ApiError replaceFavoriteAt ( Waypoint  favorite,
int  index 
)
static

Inserts a copy of a favorite waypoint at a given index. The existing waypoint at the given index is deleted.

Parameters
favorite- waypoint to insert
index- position in favorite iterator
Returns
Errorcode

The documentation for this class was generated from the following file: