MapsIndoors

class MapsIndoors

MapsIndoors

Author

Jose J Varó - Copyright © 2018 MapsPeople A/S. All rights reserved.

Types

Link copied to clipboard
interface OnAPIKeyErrorListener
Invoked in case of a INVALID_API_KEY error when performing an internal http request

Functions

Link copied to clipboard
open fun addLocationSourceOnStatusChangedListener(@Nullable listener: MPLocationSourceOnStatusChangedListener)
Adds the given listener that will be invoked each time a location source status changes
Link copied to clipboard
open fun addOnMapsIndoorsReadyListener(@NonNull listener: OnMapsIndoorsReadyListener)
Add a one time listener to be invoked when MapsIndoors is ready
Link copied to clipboard
open fun allowToDownloadData(allowToDownloadData: Boolean)
Allows or not the SDK to access the network (online data) This will directly affect the online state of the SDK (isOnline} will return false if this method is set to false)
Link copied to clipboard
open fun applyUserRoles(userRoles: List<UserRole>)
Applies a list of UserRole to the user that will get the UserRole specific locations.
Link copied to clipboard
open fun checkOfflineDataAvailability(): Boolean
Checks if there is on device data (embedded/locally stored) available.
Link copied to clipboard
open fun clearCachedData(force: Boolean)
Clean up all solution related data stored in memory.
Link copied to clipboard
open fun disableEventLogging(disableLogging: Boolean)
Disable SDK event logging through MapsIndoors.
Link copied to clipboard
open fun enableOfflineTilesUpdates(enable: Boolean)
Lets the SDK check for offline tile delta updates from MapsIndoors servers.
Link copied to clipboard
@NonNull
open fun getAPIKey(): String
Retrieves the API Key that was set using either initialize or setAPIKey
Link copied to clipboard
@Nullable
open fun getAppConfig(): AppConfig
Gets the AppConfig for the current API Key/language
Link copied to clipboard
@Nullable
open fun getAppliedUserRoles(): List<UserRole>
Returns a list of UserRole that is applied to the user
Link copied to clipboard
open fun getAuthenticationDetails(apiKey: String, onAuthDetailsReadyListener: OnAuthDetailsReadyListener)
Link copied to clipboard
@Nullable
open fun getAuthToken(): String
Gets the MapsIndoors authentication token, if any has been set.
Link copied to clipboard
@Nullable
open fun getAvailableDefaultLanguages(): List<String>
Returns a list of the current available default languages - i.e.
Link copied to clipboard
@Nullable
open fun getAvailableLanguages(): List<String>
Returns the list of the current solution's available languages
Link copied to clipboard
@Nullable
open fun getBadgedAvailabilityIcon(    location: MPLocation,     originalIcon: Bitmap,     badgePosition: BadgePosition,     state: Boolean,     colorOn: Int,     colorOff: Int,     scaleFactor: Float): Bitmap
Returns an icon with an availability badge (checkmark or cross badge, with colors, usually green and red).
Link copied to clipboard
@Nullable
open fun getBuildings(): BuildingCollection
Gets the BuildingCollection for the current API Key/language
Link copied to clipboard
@Nullable
open fun getCategories(): CategoryCollection
Gets the CategoryCollection for the current API Key/language
Link copied to clipboard
@Nullable
open fun getDataSet(): DataSet
Link copied to clipboard
@Nullable
open fun getDefaultLanguage(): String
Returns the current solution's default language
Link copied to clipboard
@Nullable
open fun getGoogleAPIKey(): String
Retrieves the Google API key set using setGoogleAPIKey
Link copied to clipboard
open fun getHighLightColor(): Int
Get the current highlight color
Link copied to clipboard
@NonNull
open fun getImageProvider(): ImageProvider
Link copied to clipboard
@Nullable
open fun getLanguage(): String
Gets the current SDK language
Link copied to clipboard
@Nullable
open fun getLocale(): Locale
Link copied to clipboard
@Nullable
open fun getLocationById(@Nullable id: String): MPLocation
Retrieves a MPLocation by its id
Link copied to clipboard
@NonNull
open fun getLocations(): List<MPLocation>
Gets all locations (a list of MPLocation objects) for the current API Key/language
Link copied to clipboard
@AnyThread
open fun getLocationsAsync(    @Nullable query: MPQuery,     @Nullable filter: MPFilter,     @Nullable listener: OnLocationsReadyListener)
Runs a query on all the available locations with optional MPQuery and MPFilter data
Link copied to clipboard
@Nullable
open fun getMapsIndoorsLocationSource(): MPLocationSource
Gets the default location data source (MapsIndoors location data)
Link copied to clipboard
@NonNull
open fun getMapStyles(): List<MapStyle>
Gets a list of available map styles
Link copied to clipboard
@Nullable
open fun getPositionProvider(): PositionProvider
Returns the current position provider, if any
Link copied to clipboard
@NonNull
open fun getSDKVersion(): String
Returns this SDK version string
Link copied to clipboard
open fun getSDKVersionCode(): Int
Returns this SDK's version code
Link copied to clipboard
@Nullable
open fun getSolution(): Solution
Gets the Solution for the current API Key/language
Link copied to clipboard
@Nullable
open fun getSolutionInfo(): SolutionInfo
Get the SolutionInfo data for the current API Key/language
Link copied to clipboard
@Nullable
open fun getUserRoles(): List<UserRole>
Gets the User Roles for the current solution Note that role names are localized
Link copied to clipboard
@Nullable
open fun getVenues(): VenueCollection
Gets the VenueCollection for the current API Key/language
Link copied to clipboard
open fun hasSynchronizeContentBeenCalled(): Boolean
Returns true if synchronizeContent() has been called at least once
Link copied to clipboard
open fun initialize(@NonNull appContext: Context, @NonNull apiKey: String): Boolean
open fun initialize(    @NonNull appContext: Context,     @NonNull apiKey: String,     @NonNull onLoadingDataReadyListener: OnLoadingDataReadyListener): Boolean
Initializes the SDK
Link copied to clipboard
open fun isAllowedToDownloadData(): Boolean
Checks if the SDK has been allowed to access the network
Link copied to clipboard
open fun isAPIKeyValid(): Boolean
Checks if the current api key is a valid one
Link copied to clipboard
open fun isInitialized(): Boolean
Returns true if at least, initialize has been already called
Link copied to clipboard
open fun isOfflineLocationsEnabled(): Boolean
Checks if location data is available for offline mode Offline location data will available if mapsindoors_offlinemode_locations_enabled is set to true in the mapsindoors_api resource file
Link copied to clipboard
open fun isOfflineModeEnabled(): Boolean
Checks if offline mode has been set Offline mode has to be set using mapsindoors_offlinemode_enabled in the mapsindoors_api.xml resource file
Link copied to clipboard
open fun isOfflineRoutingEnabled(): Boolean
Checks if offline routing has been enabled Offline Routing has to be set using mapsindoors_offlinemode_routing_enabled in the mapsindoors_api.xml resource file
Link copied to clipboard
open fun isOfflineTilesEnabled(): Boolean
Checks if MapsIndoors tiles are present in offline mode Offline Tiles will available if mapsindoors_offlinemode_tiles_enabled is set to true in the mapsindoors_api.xml resource file
Link copied to clipboard
open fun isOnline(): Boolean
Checks if the device is online and allowed to Note that even with a working network, this method will return false if network access was disallowed (by using allowDataDownload)
Link copied to clipboard
open fun isReady(): Boolean
Returns true if MapsIndoors has been initialized and data has already been loaded
Link copied to clipboard
open fun isSynchronizingContent(): Boolean
Returns true if synchronizeContent has been called and it hasn't yet finished
Link copied to clipboard
open fun onApplicationConfigurationChanged(@Nullable newConfig: Configuration)
Call this from your overridden onConfigurationChanged method
Link copied to clipboard
open fun onApplicationLowMemory()
Call this from your overridden onLowMemory method
Link copied to clipboard
@AnyThread
open fun onApplicationTerminate()
Call this from your overridden onTerminate method IMPORTANT: This will effectively remove the SDK data from memory.
Link copied to clipboard
open fun onApplicationTrimMemory(level: Int)
Call this from your overridden onTrimMemory method
open fun removeLocationSourceOnStatusChangedListener(@Nullable listener: MPLocationSourceOnStatusChangedListener)
Removes the given listener
Link copied to clipboard
open fun removeOnMapsIndoorsReadyListener(@NonNull listener: OnMapsIndoorsReadyListener)
Remove a onMapsIndoorsReadyListener
Link copied to clipboard
open fun setAPIKey(@NonNull apiKey: String): Boolean
open fun setAPIKey(@NonNull apiKey: String, @NonNull onLoadingDataReadyListener: OnLoadingDataReadyListener): Boolean
Sets the app's current MapsIndoors API Key When setting a new API key, current data will be cleared along with the active MapControl will have to be remade and initialized.
Link copied to clipboard
open fun setAPIKeyValidityListener(@Nullable onAPIKeyErrorListener: MapsIndoors.OnAPIKeyErrorListener)
Sets a callback for when a call to our servers has been rejected because of the use of an invalidated API Key
Link copied to clipboard
open fun setAuthToken(@NonNull authToken: String)
Sets the MapsIndoors authentication token.
Link copied to clipboard
open fun setGoogleAPIKey(@Nullable googleAPIKey: String)
Sets the Google API Key used by the MPRoutingProvider
Link copied to clipboard
open fun setHighLightColor(@NonNull color: Int)
Set the highlight color
Link copied to clipboard
open fun setImageProvider(@Nullable imageProvider: ImageProvider)
Sets the SDK to use a custom ImageProvider implementation
Link copied to clipboard
open fun setLanguage(@Nullable language: String): Boolean
Sets the SDK's internal language.
Link copied to clipboard
@AnyThread
open fun setLocationSources(@NonNull locationSources: Array<MPLocationSource>, @Nullable onResultReadyListener: OnResultReadyListener)
Sets one or more location data sources Note that if this method is not invoked, a MapsIndoors data source will be usedWhen this method is invoked, getLocations() will be called on all the location sources registered
Link copied to clipboard
open fun setNetworkOptions(@NonNull mpNetworkOptions: MPNetworkOptions)
Sets a MPNetworkOptions to use for all internal Backend Requests.
Link copied to clipboard
open fun setOnMapsIndoorsReadyListener(@NonNull listener: OnMapsIndoorsReadyListener)
Sets a one time listener to be invoked when MapsIndoors is ready
Link copied to clipboard
open fun setPositionProvider(@Nullable positionProvider: PositionProvider)
Link copied to clipboard
open fun startPositioning()
Starts the positioning service.
Link copied to clipboard
open fun stopPositioning()
Stops the positioning service.
Link copied to clipboard
@AnyThread
open fun synchronizeContent(@Nullable onSyncDataReadyListener: OnSyncDataReadyListener): Boolean
Main data synchronization method If not manually invoked, MapControl.init() will