Java SDK for 2D
 All Classes Namespaces Functions Variables Pages
ApiFavorites Class Reference

Static Public Member Functions

static ArrayList< PoigetFavoritesList (boolean searchAddress, int maxTime) throws GeneralException
 Returns list of POIs in Favorites category. More...
 
static String addStopOffPointsToFavorites (Poi poi, int maxTime) throws InvalidLocationException
 Adds user defined POI to Favorites category. More...
 
static String removeFavoriteFromList (Poi favorite, int maxTime) throws InvalidNameException
 Removes POI from list of Favorites. More...
 

Member Function Documentation

static String addStopOffPointsToFavorites ( Poi  poi,
int  maxTime 
) throws InvalidLocationException
static

Adds user defined POI to Favorites category.

Parameters
poiPoi instance which contains information about POI to add.
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.
Returns
address of location if Poi#isSearchAddress() is true, else null
Exceptions
InvalidLocationExceptionthe invalid location exception

References Api.getInstance(), Api.getService(), and Poi.writeBundle().

static ArrayList<Poi> getFavoritesList ( boolean  searchAddress,
int  maxTime 
) throws GeneralException
static

Returns list of POIs in Favorites category.

Parameters
searchAddressSpecifies whether getFavoritesList function searches for address or not. If searchAddress=true getFavoritesList() fills address member of each FavoriteArr item (see Poi class) with corresponding address.
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.
Returns
ArrayList of POIs
Exceptions
GeneralExceptionthe general exception

References Api.getInstance(), Api.getService(), and Poi.readBundle().

static String removeFavoriteFromList ( Poi  favorite,
int  maxTime 
) throws InvalidNameException
static

Removes POI from list of Favorites.

Parameters
favoritePoi instance which contains information about POI to remove.
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.
Returns
address of location if Poi#isSearchAddress() is true, else null
Exceptions
InvalidNameExceptionthe invalid name exception

References Api.getInstance(), Api.getService(), and Poi.writeBundle().