VenueService (API Reference)
Class VenueService
Offers methods to download venues. Use of this object does not necessitate Map involvement.
Before loading the venues, initialize the venue service with one of the start methods.
The venue service is online only. Even if there is a cached venue on the device, the venue service requires an online connection to check if the venue is available for the user.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumOptional features enum -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(VenueListener listener) Adds a venue listener.voidadd(VenueMapListener listener) Adds a venue map listener.voidadd(VenueServiceListener listener) Adds a service listener.voidaddVenueToLoad(int venueId) Adds a venue to the loading queue.voidaddVenueToLoad(String venueIdentifier) Adds a venue to the loading queue.Gets an initialization status.Gets an active language in the venue service.Gets the languages available in the venue service.booleanChecks if the venue service is initialized.voidloadOptionalFeatures(List<VenueService.VenueOptionalFeature> optionalFeatureList) Lets user load optional features for current session.voidLets user load topologies for current sessionvoidremove(VenueListener listener) Removes a venue listener.voidremove(VenueMapListener listener) Removes a venue map listener.voidremove(VenueServiceListener listener) Removes a service listener.voidSets HRN of platform catalog.voidsetLabeltextPreference(List<String> labelTextPref) Sets override labelTextPreference for labels.voidsetLanguage(String value) Sets an active language.voidstop()Stops the venue service.
-
Method Details
-
stop
public void stop()Stops the venue service.
-
add
Adds a service listener. The listener is not added if it is
nullor is already present in the list of listeners.- Parameters:
listener-The service listener to add.
-
remove
Removes a service listener. The listener is not removed if it is not present in the list of listeners.
- Parameters:
listener-The service listener to remove.
-
add
Adds a venue listener. The listener is not added if it is
nullor is already present in the list of listeners.- Parameters:
listener-The venue listener to add.
-
remove
Removes a venue listener. The listener is not removed if it is not present in the list of listeners.
- Parameters:
listener-The venue listener to remove.
-
add
Adds a venue map listener. The listener is not added if it is
nullor is already present in the list of listeners.- Parameters:
listener-The venue map listener to add.
-
remove
Removes a venue map listener. The listener is not removed if it is not present in the list of listeners.
- Parameters:
listener-The venue map listener to remove.
-
getInitStatus
Gets an initialization status.
- Returns:
The initialization status.
-
isInitialized
public boolean isInitialized()Checks if the venue service is initialized.
- Returns:
Trueif the venue service is initialized andfalseotherwise.
-
addVenueToLoad
public void addVenueToLoad(int venueId) Adds a venue to the loading queue.
- Parameters:
venueId-The id of the venue to load.
-
addVenueToLoad
Adds a venue to the loading queue.
- Parameters:
venueIdentifier-The id of the venue to load.
-
setHrn
Sets HRN of platform catalog.
- Parameters:
hrn-The HRN of platform catalog.
-
setLabeltextPreference
Sets override labelTextPreference for labels.
- Parameters:
labelTextPref-The list of string override labelTextPreference.
"OCCUPANT_NAMES" - To display only occupant names on map as a label text. Example: Boutique Du Chocolat for id 7348
"SPACE_NAME" - To display only space names on map as a label text. Example: Family Services/First Aid for id 7348
"SPACE_TYPE_NAME" - To display only space types on map as a label text. Example: DEFIBRILLATOR for id 7348
"SPACE_CATEGORY_NAME" - To display only space categories on map as a label text. Example: SAFETY for id 7348
"INTERNAL_ADDRESS" - To display only internal addresses on map as a label text. Example: 51/D for id 7348
-
loadTopologies
public void loadTopologies()Lets user load topologies for current session
-
loadOptionalFeatures
public void loadOptionalFeatures(@NonNull List<VenueService.VenueOptionalFeature> optionalFeatureList) Lets user load optional features for current session.
- Parameters:
optionalFeatureList-The list of optional feature enum VenueOptionalFeature.
-
getLanguages
Gets the languages available in the venue service.
- Returns:
The languages available in the venue service.
-
getLanguage
Gets an active language in the venue service.
The venue service will try to load a venue with a translation in the active language. If such translation doesn't exist, a venue will be loaded in its default language.
- Returns:
The active language.
-
setLanguage
Sets an active language.
The venue service will try to load a venue with a translation in the active language. If such translation doesn't exist, a venue will be loaded in its default language.
- Parameters:
value-The active language.
-