Package es.situm.sdk.communication
Interface CommunicationManager
-
public interface CommunicationManager
The Communication manager allows you to make asynchronous requests to the server, mostly to fetch data.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
CommunicationManager.Code
The error codes received inHandler.onFailure(Error)
on theCommunicationManager
static interface
CommunicationManager.PropertyKey
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description boolean
createOccurrenceForEvent(SitumEvent event, Handler<EventOccurrence> callback)
Create an occurrence for an event.boolean
eventClicked(EventOccurrence occurrence, Handler<EventOccurrence> callback)
Deprecated.boolean
eventClicked(EventOccurrence occurrence, java.util.Map<java.lang.String,java.lang.Object> options, Handler<EventOccurrence> callback)
Deprecated.boolean
eventConverted(EventOccurrence occurrence, Handler<EventOccurrence> callback)
Deprecated.boolean
eventConverted(EventOccurrence occurrence, java.util.Map<java.lang.String,java.lang.Object> options, Handler<EventOccurrence> callback)
Deprecated.boolean
eventSeen(SitumEvent event, Handler<EventOccurrence> callback)
Deprecated.usecreateOccurrenceForEvent(SitumEvent, Handler)
insteadboolean
eventSeen(SitumEvent event, java.util.Map<java.lang.String,java.lang.Object> options, Handler<EventOccurrence> callback)
Deprecated.usecreateOccurrenceForEvent(SitumEvent, Handler)
insteadboolean
fetchAllPOIsFromUser(CommunicationConfig config, Handler<java.util.Collection<Poi>> callback)
Download the POIs from all the buildings of the userboolean
fetchAllPOIsFromUser(Handler<java.util.Collection<Poi>> callback)
Download the POIs from all the buildings of the userboolean
fetchBuildingInfo(Building building, Handler<BuildingInfo> callback)
Deprecated.usefetchBuildingInfo(String, Handler)
insteadboolean
fetchBuildingInfo(Building building, java.util.Map<java.lang.String,java.lang.Object> options, Handler<BuildingInfo> callback)
Deprecated.boolean
fetchBuildingInfo(java.lang.String buildingId, CommunicationConfig config, Handler<BuildingInfo> callback)
Download all the building data from the selected building.boolean
fetchBuildingInfo(java.lang.String buildingId, Handler<BuildingInfo> callback)
Download all the building data for the selected building.boolean
fetchBuildings(CommunicationConfig config, Handler<java.util.Collection<Building>> callback)
Download all the buildings for the current userboolean
fetchBuildings(Handler<java.util.Collection<Building>> callback)
Download all the buildings for the current userboolean
fetchBuildings(java.util.Map<java.lang.String,java.lang.Object> options, Handler<java.util.Collection<Building>> callback)
Deprecated.usefetchBuildings(CommunicationConfig, Handler)
insteadboolean
fetchCalibratedArea(Building building, Floor floor, Handler<java.util.Collection<CalibrationArea>> callback)
Deprecated.UseCalibrationManager.fetchActiveGtScans(Floor, Handler)
boolean
fetchCalibrationBleScans(Building building, Floor floor, Handler<Scans> callback)
Deprecated.UseCalibrationManager.fetchActiveBleScans(Floor, Handler)
boolean
fetchCalibrationWifiScans(Building building, Floor floor, Handler<Scans> callback)
Deprecated.UseCalibrationManager.fetchActiveWifiScans(Floor, Handler)
boolean
fetchEventsFromBuilding(Building building, Handler<java.util.Collection<SitumEvent>> callback)
Deprecated.usefetchEventsFromBuilding(String, Handler)
insteadboolean
fetchEventsFromBuilding(Building building, java.util.Map<java.lang.String,java.lang.Object> options, Handler<java.util.Collection<SitumEvent>> callback)
Deprecated.boolean
fetchEventsFromBuilding(java.lang.String buildingId, CommunicationConfig config, Handler<java.util.Collection<SitumEvent>> callback)
Download the events of a buildingboolean
fetchEventsFromBuilding(java.lang.String buildingId, Handler<java.util.Collection<SitumEvent>> callback)
Download the events of a buildingboolean
fetchFloorsFromBuilding(Building building, Handler<java.util.Collection<Floor>> callback)
Deprecated.usefetchFloorsFromBuilding(String, Handler)
insteadboolean
fetchFloorsFromBuilding(Building building, java.util.Map<java.lang.String,java.lang.Object> options, Handler<java.util.Collection<Floor>> callback)
Deprecated.boolean
fetchFloorsFromBuilding(java.lang.String buildingId, CommunicationConfig config, Handler<java.util.Collection<Floor>> callback)
Download all the floors of a buildingboolean
fetchFloorsFromBuilding(java.lang.String buildingId, Handler<java.util.Collection<Floor>> callback)
Download all the floors of a buildingboolean
fetchGeofencesFromBuilding(Building building, CommunicationConfig config, Handler<java.util.List<Geofence>> callback)
Get the geofences of a buildingboolean
fetchGeofencesFromBuilding(Building building, Handler<java.util.List<Geofence>> callback)
Get the geofences of a buildingboolean
fetchGeofencesFromBuilding(Building building, java.util.Map<java.lang.String,java.lang.Object> options, Handler<java.util.List<Geofence>> callback)
Deprecated.boolean
fetchIndoorPOIFromBuilding(java.lang.String poiId, java.lang.String buildingId, CommunicationConfig config, Handler<Poi> callback)
Download the given indoor POI of a building.boolean
fetchIndoorPOIFromBuilding(java.lang.String poiId, java.lang.String buildingId, Handler<Poi> callback)
Download the given indoor POI of a building.boolean
fetchIndoorPOIsFromBuilding(Building building, Handler<java.util.Collection<Poi>> callback)
Deprecated.usefetchIndoorPOIsFromBuilding(String, Handler)
insteadboolean
fetchIndoorPOIsFromBuilding(Building building, java.util.Map<java.lang.String,java.lang.Object> options, Handler<java.util.Collection<Poi>> callback)
Deprecated.boolean
fetchIndoorPOIsFromBuilding(java.lang.String buildingId, CommunicationConfig config, Handler<java.util.Collection<Poi>> callback)
Download the indoor POIs of a buildingboolean
fetchIndoorPOIsFromBuilding(java.lang.String buildingId, Handler<java.util.Collection<Poi>> callback)
Download the indoor POIs of a buildingboolean
fetchMapFromFloor(Floor floor, CommunicationConfig config, Handler<android.graphics.Bitmap> callback)
Download the map image of a floorboolean
fetchMapFromFloor(Floor floor, Handler<android.graphics.Bitmap> callback)
Download the map image of a floorboolean
fetchMapFromFloor(Floor floor, java.util.Map<java.lang.String,java.lang.Object> options, Handler<android.graphics.Bitmap> callback)
Deprecated.boolean
fetchOrganizationTheme(Handler<OrganizationTheme> callback)
Get organization theme: company name, logo and colorsboolean
fetchOutdoorPOIsFromBuilding(Building building, Handler<java.util.Collection<Poi>> callback)
Deprecated.usefetchOutdoorPOIsFromBuilding(String, Handler)
insteadboolean
fetchOutdoorPOIsFromBuilding(Building building, java.util.Map<java.lang.String,java.lang.Object> options, Handler<java.util.Collection<Poi>> callback)
Deprecated.boolean
fetchOutdoorPOIsFromBuilding(java.lang.String buildingId, CommunicationConfig config, Handler<java.util.Collection<Poi>> callback)
Download the outdoor POIs of a buildingboolean
fetchOutdoorPOIsFromBuilding(java.lang.String buildingId, Handler<java.util.Collection<Poi>> callback)
Download the outdoor POIs of a buildingboolean
fetchPoiCategories(CommunicationConfig config, Handler<java.util.Collection<PoiCategory>> callback)
Get all POI categories, download and cache their icons asynchronously.boolean
fetchPoiCategories(Handler<java.util.Collection<PoiCategory>> callback)
Get all POI categories, download and cache their icons asynchronouslyboolean
fetchPoiCategories(java.util.Map<java.lang.String,java.lang.Object> options, Handler<java.util.Collection<PoiCategory>> callback)
Deprecated.usefetchPoiCategories(CommunicationConfig, Handler)
insteadboolean
fetchPoiCategoryIcon(PoiCategory category, boolean selected, CommunicationConfig config, Handler<android.graphics.Bitmap> callback)
Get the normal category icon for a categoryboolean
fetchPoiCategoryIcon(PoiCategory category, boolean selected, Handler<android.graphics.Bitmap> callback)
Get the normal category icon for a categoryboolean
fetchPoiCategoryIconNormal(PoiCategory category, Handler<android.graphics.Bitmap> callback)
Deprecated.boolean
fetchPoiCategoryIconNormal(PoiCategory category, java.util.Map<java.lang.String,java.lang.Object> options, Handler<android.graphics.Bitmap> callback)
Deprecated.boolean
fetchPoiCategoryIconSelected(PoiCategory category, Handler<android.graphics.Bitmap> callback)
Deprecated.boolean
fetchPoiCategoryIconSelected(PoiCategory category, java.util.Map<java.lang.String,java.lang.Object> options, Handler<android.graphics.Bitmap> callback)
Deprecated.boolean
fetchRailWidth(Building building, Handler<java.lang.Float> callback)
Deprecated.usefetchRailWidth(String, Handler)
insteadboolean
fetchRailWidth(java.lang.String buildingId, Handler<java.lang.Float> callback)
Get the calibrations rail width used in a buildingboolean
fetchRemoteConfig(LocationRequest locationRequest, Handler<RemoteConfig> callback)
Get theRemoteConfig
for the current user.boolean
fetchRemoteConfig(Handler<RemoteConfig> callback)
Get theRemoteConfig
for the current user.boolean
fetchTilesFromBuilding(java.lang.String buildingId, Handler<java.lang.String> callback)
Download the building Tiles.HttpRequestExecutor
getHttpRequestExecutor()
Return the HTTP Request Executor to make custom requests to the DashboardSitumTile
getTileFromBuilding(java.lang.String buildingId, java.lang.String floorId, int x, int y, int zoom)
Returns a specific image tile for a building and floor combination.void
invalidateCache()
Invalidate all the resources in the cachevoid
invalidateTiles()
Invalidate all tiles resourcesboolean
logout(Handler<java.lang.Object> callback)
Invalidate user's token and remove it from internal credentials, if exist.boolean
prefetchPositioningInfo(CommunicationConfig config, Handler<java.lang.String> callback)
Download all the necessary information to start positioning.boolean
prefetchPositioningInfo(Handler<java.lang.String> callback)
Download all the necessary information to start positioning.boolean
prefetchPositioningInfo(java.util.List<java.lang.String> buildingIds, CommunicationConfig config, Handler<java.lang.String> callback)
Download all the necessary information to start positioning in the selected buildings.boolean
prefetchPositioningInfo(java.util.List<java.lang.String> buildingIds, Handler<java.lang.String> callback)
Download all the necessary information to start positioning in the selected buildings.boolean
prefetchPositioningInfo(java.util.List<java.lang.String> buildingIds, java.util.Map<java.lang.String,java.lang.Object> options, Handler<java.lang.String> callback)
Deprecated.boolean
prefetchPositioningInfo(java.util.Map<java.lang.String,java.lang.Object> options, Handler<java.lang.String> callback)
Deprecated.boolean
updateOccurrence(EventOccurrence occurrence, EventAction action, Handler<EventOccurrence> callback)
Update an event occurrence The time when the action was produced can be provided in theoccurrence
; if not,new Date()
is assumed.boolean
updateRailWidth(Building building, float railWidth, Handler<java.lang.Object> callback)
Deprecated.useupdateRailWidth(String, float, Handler)
insteadboolean
updateRailWidth(java.lang.String building, float railWidth, Handler<java.lang.Object> callback)
Update the calibrations rail width for a buildingboolean
validateUserCredentials(Handler<java.lang.Object> callback)
Check if the user credentials previously set withConfiguration.setUserPass(String, String)
,SitumSdk.configuration()
or in the AndroidManifest.xml are right.
-
-
-
Method Detail
-
validateUserCredentials
boolean validateUserCredentials(@NonNull Handler<java.lang.Object> callback)
Check if the user credentials previously set withConfiguration.setUserPass(String, String)
,SitumSdk.configuration()
or in the AndroidManifest.xml are right.- Parameters:
callback
- invoked when login is finished. If the user and/or password/api key aren't valid aCommunicationManager.Code.HTTP_UNAUTHORIZED
will be received inHandler.onFailure(Error)
- Returns:
- True if request is sent. False if request can't be sent: there is no user email and password.
-
fetchOrganizationTheme
boolean fetchOrganizationTheme(@NonNull Handler<OrganizationTheme> callback)
Get organization theme: company name, logo and colors- Parameters:
callback
- Callback to asynchronously receive the organization theme. Not null.- Returns:
- True if request is sent. False if request can't be sent:
-
logout
boolean logout(Handler<java.lang.Object> callback)
Invalidate user's token and remove it from internal credentials, if exist. If not exist, return false. After invalidation, first network request will cause a login, to obtain another valid token.- Parameters:
callback
- invoked when logout is finished- Returns:
- True if request is correctly sent. False if can't be sent: there is no user token.
-
prefetchPositioningInfo
boolean prefetchPositioningInfo(@NonNull Handler<java.lang.String> callback)
Download all the necessary information to start positioning. This includesBuilding
,BuildingInfo
and the building's model. Downloaded information will be saved in cache. Previous to version 2.50.2 the model was only obtained while starting positioning inside aBuilding
- Parameters:
callback
- Callback to asynchronously receive the result of this call. An error will be notified if anything fails during the download, only the most critical error will be sent
-
prefetchPositioningInfo
boolean prefetchPositioningInfo(CommunicationConfig config, Handler<java.lang.String> callback)
Download all the necessary information to start positioning. This includesBuilding
,BuildingInfo
and the building's model. Downloaded information will be saved in cache. Previous to version 2.50.2 the model was only obtained while starting positioning inside aBuilding
- Parameters:
callback
- Callback to asynchronously receive the result of this call. An error will be notified if anything fails during the download, only the most critical error will be sentconfig
- request specific configuration. Can be null.
-
prefetchPositioningInfo
boolean prefetchPositioningInfo(@NonNull java.util.List<java.lang.String> buildingIds, @NonNull Handler<java.lang.String> callback)
Download all the necessary information to start positioning in the selected buildings. This includesBuilding
,BuildingInfo
and the building's model. Downloaded information will be saved in cache. Previous to version 2.50.2 the model was only obtained while starting positioning inside aBuilding
- Parameters:
buildingIds
- List with the ids of the buildings you want to prefetchcallback
- Callback to asynchronously receive the result of this call. An error will be notified if anything fails during the download, only the most critical error will be sent
-
prefetchPositioningInfo
boolean prefetchPositioningInfo(@NonNull java.util.List<java.lang.String> buildingIds, CommunicationConfig config, Handler<java.lang.String> callback)
Download all the necessary information to start positioning in the selected buildings. This includesBuilding
,BuildingInfo
and the building's model. Downloaded information will be saved in cache. Previous to version 2.50.2 the model was only obtained while starting positioning inside aBuilding
- Parameters:
buildingIds
- List with the ids of the buildings you want to prefetchcallback
- Callback to asynchronously receive the result of this call. An error will be notified if anything fails during the download, only the most critical error will be sentconfig
- request specific configuration. Can be null.
-
fetchBuildings
boolean fetchBuildings(@NonNull Handler<java.util.Collection<Building>> callback)
Download all the buildings for the current user- Parameters:
callback
- Callback to asynchronously receive the buildings. Not null.
-
fetchBuildings
boolean fetchBuildings(CommunicationConfig config, @NonNull Handler<java.util.Collection<Building>> callback)
Download all the buildings for the current user- Parameters:
config
- request specific configuration. Can be null.callback
- Callback to asynchronously receive the buildings. Not null.
-
fetchBuildingInfo
boolean fetchBuildingInfo(java.lang.String buildingId, @NonNull Handler<BuildingInfo> callback)
Download all the building data for the selected building. This info includes floors, indoor and outdoor POIs, events and paths. Also it download floor maps and POI category icons to local storage.- Parameters:
buildingId
- selected building for download info. Not null.callback
- Callback to asynchronously receive the buildings. Not null.
-
fetchBuildingInfo
boolean fetchBuildingInfo(@NonNull java.lang.String buildingId, CommunicationConfig config, @NonNull Handler<BuildingInfo> callback)
Download all the building data from the selected building. This info includes floors, indoor and outdoor POIs, events and paths. Also it download floor maps and POI category icons to local storage.- Parameters:
buildingId
- selected building for download info. Not null.config
- request specific configuration. Can be null.callback
- Callback to asynchronously receive the buildings. Not null.
-
fetchFloorsFromBuilding
boolean fetchFloorsFromBuilding(@NonNull java.lang.String buildingId, @NonNull Handler<java.util.Collection<Floor>> callback)
Download all the floors of a building- Parameters:
buildingId
- the building identifier. Not null.callback
- Callback to asynchronously receive the floors. Not null.
-
fetchFloorsFromBuilding
boolean fetchFloorsFromBuilding(@NonNull java.lang.String buildingId, CommunicationConfig config, @NonNull Handler<java.util.Collection<Floor>> callback)
Download all the floors of a building- Parameters:
buildingId
- the building identifier. Not null.config
- request specific configuration. Can be null.callback
- Callback to asynchronously receive the floors. Not null.
-
fetchTilesFromBuilding
boolean fetchTilesFromBuilding(java.lang.String buildingId, Handler<java.lang.String> callback)
Download the building Tiles. Not all the buildings have tiles available to be downloaded. If the tiles are available, a zip file is downloaded and unzipped in the internal storage.- Parameters:
buildingId
-callback
-
-
getTileFromBuilding
SitumTile getTileFromBuilding(java.lang.String buildingId, java.lang.String floorId, int x, int y, int zoom)
Returns a specific image tile for a building and floor combination. The tile could be a path to an internal storage, for the case that the tiles were previously fetched for a particular building or a URL to an online one in any other case.- Parameters:
buildingId
-floorId
-x
-y
-zoom
-- Returns:
-
fetchMapFromFloor
boolean fetchMapFromFloor(@NonNull Floor floor, @NonNull Handler<android.graphics.Bitmap> callback)
Download the map image of a floor- Parameters:
floor
- the floor. Not null.callback
- callback to asynchronously receive the floor image. Not null.
-
fetchMapFromFloor
boolean fetchMapFromFloor(@NonNull Floor floor, CommunicationConfig config, @NonNull Handler<android.graphics.Bitmap> callback)
Download the map image of a floor- Parameters:
floor
- the floor. Not null.config
- request specific configuration. Can be null.callback
- callback to asynchronously receive the image. Not null.
-
fetchIndoorPOIsFromBuilding
boolean fetchIndoorPOIsFromBuilding(@NonNull java.lang.String buildingId, @NonNull Handler<java.util.Collection<Poi>> callback)
Download the indoor POIs of a building- Parameters:
buildingId
- the building identifier. Not null.callback
- Callback to asynchronously receive the points of interest. Not null.
-
fetchIndoorPOIsFromBuilding
boolean fetchIndoorPOIsFromBuilding(@NonNull java.lang.String buildingId, CommunicationConfig config, @NonNull Handler<java.util.Collection<Poi>> callback)
Download the indoor POIs of a building- Parameters:
buildingId
- the building identifier. Not null.config
- request specific configuration. Can be null.callback
- callback to asynchronously receive the points of interest. Not null.
-
fetchIndoorPOIFromBuilding
boolean fetchIndoorPOIFromBuilding(@NonNull java.lang.String poiId, @NonNull java.lang.String buildingId, @NonNull Handler<Poi> callback)
Download the given indoor POI of a building.- Parameters:
poiId
- the POI identifier. Not null.buildingId
- the building identifier. Not null.callback
- callback to asynchronously receive the points of interest. Not null.- Returns:
-
fetchIndoorPOIFromBuilding
boolean fetchIndoorPOIFromBuilding(@NonNull java.lang.String poiId, @NonNull java.lang.String buildingId, CommunicationConfig config, @NonNull Handler<Poi> callback)
Download the given indoor POI of a building.- Parameters:
poiId
- the POI identifier. Not null.buildingId
- the building identifier. Not null.config
- request specific configuration. Can be null.callback
- callback to asynchronously receive the points of interest. Not null.- Returns:
-
fetchAllPOIsFromUser
boolean fetchAllPOIsFromUser(@NonNull Handler<java.util.Collection<Poi>> callback)
Download the POIs from all the buildings of the user- Parameters:
callback
- callback to asynchronously receive the points of interest. Not null.
-
fetchAllPOIsFromUser
boolean fetchAllPOIsFromUser(CommunicationConfig config, @NonNull Handler<java.util.Collection<Poi>> callback)
Download the POIs from all the buildings of the user- Parameters:
config
- request specific configuration. Can be null.callback
- callback to asynchronously receive the points of interest. Not null.
-
fetchPoiCategories
boolean fetchPoiCategories(@NonNull Handler<java.util.Collection<PoiCategory>> callback)
Get all POI categories, download and cache their icons asynchronouslyTo get some of those icons from local storage use
fetchPoiCategoryIconNormal(PoiCategory, Handler)
orfetchPoiCategoryIconSelected(PoiCategory, Handler)
- Parameters:
callback
- Callback to asynchronously receive the POI categories. Not null.
-
fetchPoiCategories
boolean fetchPoiCategories(CommunicationConfig config, @NonNull Handler<java.util.Collection<PoiCategory>> callback)
Get all POI categories, download and cache their icons asynchronously.To get some of those icons from local storage use
fetchPoiCategoryIconNormal(PoiCategory, Handler)
orfetchPoiCategoryIconSelected(PoiCategory, Handler)
- Parameters:
config
- the request specific configuration. Can be null.callback
- Callback to asynchronously receive the POI categories
-
fetchPoiCategoryIcon
boolean fetchPoiCategoryIcon(@NonNull PoiCategory category, boolean selected, @NonNull Handler<android.graphics.Bitmap> callback)
Get the normal category icon for a category- Parameters:
category
- the category. Not null.selected
- fetch icon for selected or normal state.callback
- the callback. Not null.
-
fetchPoiCategoryIcon
boolean fetchPoiCategoryIcon(@NonNull PoiCategory category, boolean selected, CommunicationConfig config, @NonNull Handler<android.graphics.Bitmap> callback)
Get the normal category icon for a category- Parameters:
category
- the category. Not null.selected
- fetch icon for selected or normal state.config
- the request specific configuration. Can be null.callback
- the callback. Not null.
-
fetchOutdoorPOIsFromBuilding
boolean fetchOutdoorPOIsFromBuilding(@NonNull java.lang.String buildingId, @NonNull Handler<java.util.Collection<Poi>> callback)
Download the outdoor POIs of a building- Parameters:
buildingId
- the building identifier. Not null.callback
- Callback to asynchronously receive the points of interest. Not null.
-
fetchOutdoorPOIsFromBuilding
boolean fetchOutdoorPOIsFromBuilding(@NonNull java.lang.String buildingId, CommunicationConfig config, @NonNull Handler<java.util.Collection<Poi>> callback)
Download the outdoor POIs of a building- Parameters:
buildingId
- the building identifier. Not null.config
- requerst specific configuration. Can be null.callback
- Callback to asynchronously receive the points of interest. Not null.
-
fetchEventsFromBuilding
boolean fetchEventsFromBuilding(@NonNull java.lang.String buildingId, @NonNull Handler<java.util.Collection<SitumEvent>> callback)
Download the events of a building- Parameters:
buildingId
- the building identifier. Not null.callback
- Callback to asynchronously receive the events of a building. Not null.
-
fetchEventsFromBuilding
boolean fetchEventsFromBuilding(@NonNull java.lang.String buildingId, CommunicationConfig config, @NonNull Handler<java.util.Collection<SitumEvent>> callback)
Download the events of a building- Parameters:
buildingId
- the building identifier. Not null.config
- request specific configuration. Can be null.callback
- Callback to asynchronously receive the events of a building. Not null.
-
createOccurrenceForEvent
boolean createOccurrenceForEvent(@NonNull SitumEvent event, @NonNull Handler<EventOccurrence> callback)
Create an occurrence for an event.- Parameters:
event
- the event that occurred. Not null.callback
- receives an event occurrence, necessary to notify a click and conversion of the same event. Not null.- See Also:
EventOccurrence
-
updateOccurrence
boolean updateOccurrence(@NonNull EventOccurrence occurrence, EventAction action, @NonNull Handler<EventOccurrence> callback)
Update an event occurrence The time when the action was produced can be provided in theoccurrence
; if not,new Date()
is assumed.- Parameters:
occurrence
- event occurrence. Not null. occurrence.getId() not null.action
- action performed on the event.callback
- receives the updated occurrence, necessary to notify a conversion of the same event. Not null.- See Also:
EventOccurrence
-
fetchGeofencesFromBuilding
boolean fetchGeofencesFromBuilding(@NonNull Building building, @NonNull Handler<java.util.List<Geofence>> callback)
Get the geofences of a building- Parameters:
building
- the building. Not null.callback
- the callback. Not null.
-
fetchGeofencesFromBuilding
boolean fetchGeofencesFromBuilding(@NonNull Building building, CommunicationConfig config, @NonNull Handler<java.util.List<Geofence>> callback)
Get the geofences of a building- Parameters:
building
- the building. Not null.config
- request specific configuration. Can be null.callback
- the callback. Not null.
-
fetchRailWidth
boolean fetchRailWidth(@NonNull java.lang.String buildingId, @NonNull Handler<java.lang.Float> callback)
Get the calibrations rail width used in a building- Parameters:
buildingId
- the building identifier. Not nullcallback
- the callback. Not null
-
updateRailWidth
boolean updateRailWidth(@NonNull java.lang.String building, float railWidth, @NonNull Handler<java.lang.Object> callback)
Update the calibrations rail width for a building- Parameters:
building
- the building identifier. Not nullrailWidth
- the new rail widthcallback
- the callback. Not null
-
fetchRemoteConfig
boolean fetchRemoteConfig(@NonNull Handler<RemoteConfig> callback)
Get theRemoteConfig
for the current user.- Parameters:
callback
- Callback to asynchronously receive the remote config. Not null.
-
fetchRemoteConfig
boolean fetchRemoteConfig(@NonNull LocationRequest locationRequest, @NonNull Handler<RemoteConfig> callback)
Get theRemoteConfig
for the current user. The givenLocationRequest
will be used do override the remote location request.- Parameters:
locationRequest
- Local location request used to override remote values. Not null.callback
- Callback to asynchronously receive the remote config. Not null.
-
invalidateCache
void invalidateCache()
Invalidate all the resources in the cache
-
invalidateTiles
void invalidateTiles()
Invalidate all tiles resources
-
getHttpRequestExecutor
@NonNull HttpRequestExecutor getHttpRequestExecutor()
Return the HTTP Request Executor to make custom requests to the Dashboard
-
prefetchPositioningInfo
@Deprecated boolean prefetchPositioningInfo(java.util.Map<java.lang.String,java.lang.Object> options, Handler<java.lang.String> callback)
Deprecated.Download all the necessary information to start positioning. This includesBuilding
,BuildingInfo
and the building's model. Downloaded information will be saved in cache. Previous to version 2.50.2 the model was only obtained while starting positioning inside aBuilding
- Parameters:
callback
- Callback to asynchronously receive the result of this call. An error will be notified if anything fails during the download, only the most critical error will be sentoptions
- the request options. Can be null. Accepted options:CommunicationOptions.FORCE_DOWNLOAD
,CommunicationOptions.SERVER_FIRST
,CommunicationOptions.CACHE_FIRST
,CommunicationOptions.PRELOAD_IMAGES
-
prefetchPositioningInfo
@Deprecated boolean prefetchPositioningInfo(@NonNull java.util.List<java.lang.String> buildingIds, java.util.Map<java.lang.String,java.lang.Object> options, Handler<java.lang.String> callback)
Deprecated.Download all the necessary information to start positioning in the selected buildings. This includesBuilding
,BuildingInfo
and the building's model. Downloaded information will be saved in cache. Previous to version 2.50.2 the model was only obtained while starting positioning inside aBuilding
- Parameters:
buildingIds
- List with the ids of the buildings you want to prefetchcallback
- Callback to asynchronously receive the result of this call. An error will be notified if anything fails during the download, only the most critical error will be sentoptions
- the request options. Can be null. Accepted options:CommunicationOptions.FORCE_DOWNLOAD
,CommunicationOptions.SERVER_FIRST
,CommunicationOptions.CACHE_FIRST
,CommunicationOptions.PRELOAD_IMAGES
-
fetchBuildings
@Deprecated boolean fetchBuildings(java.util.Map<java.lang.String,java.lang.Object> options, @NonNull Handler<java.util.Collection<Building>> callback)
Deprecated.usefetchBuildings(CommunicationConfig, Handler)
insteadDownload all the buildings for the current user- Parameters:
options
- the request options. Can be null. Accepted options:CommunicationOptions.FORCE_DOWNLOAD
,CommunicationOptions.SERVER_FIRST
callback
- Callback to asynchronously receive the buildings. Not null.
-
fetchBuildingInfo
@Deprecated boolean fetchBuildingInfo(Building building, @NonNull Handler<BuildingInfo> callback)
Deprecated.usefetchBuildingInfo(String, Handler)
insteadDownload all the building data for the selected building. This info includes floors, indoor and outdoor POIs, events and paths. Also it download floor maps and POI category icons to local storage.- Parameters:
building
- selected building for download info. Not null.callback
- Callback to asynchronously receive the buildings. Not null.
-
fetchBuildingInfo
@Deprecated boolean fetchBuildingInfo(@NonNull Building building, java.util.Map<java.lang.String,java.lang.Object> options, @NonNull Handler<BuildingInfo> callback)
Deprecated.Download all the building data from the selected building. This info includes floors, indoor and outdoor POIs, events and paths. Also it download floor maps and POI category icons to local storage.- Parameters:
building
- selected building for download info. Not null.options
- the request options. Can be null. Accepted options:CommunicationOptions.FORCE_DOWNLOAD
,CommunicationOptions.SERVER_FIRST
,CommunicationOptions.PRELOAD_IMAGES
callback
- Callback to asynchronously receive the buildings. Not null.
-
fetchFloorsFromBuilding
@Deprecated boolean fetchFloorsFromBuilding(@NonNull Building building, @NonNull Handler<java.util.Collection<Floor>> callback)
Deprecated.usefetchFloorsFromBuilding(String, Handler)
insteadDownload all the floors of a building- Parameters:
building
- the building. Not null.callback
- Callback to asynchronously receive the floors. Not null.
-
fetchFloorsFromBuilding
@Deprecated boolean fetchFloorsFromBuilding(@NonNull Building building, java.util.Map<java.lang.String,java.lang.Object> options, @NonNull Handler<java.util.Collection<Floor>> callback)
Deprecated.Download all the floors of a building- Parameters:
building
- the building. Not null.options
- the request options. Can be null. Accepted options: FORCE_DOWNLOAD (download regardless cache),CommunicationOptions.PRELOAD_IMAGES
callback
- Callback to asynchronously receive the floors. Not null.
-
fetchMapFromFloor
@Deprecated boolean fetchMapFromFloor(@NonNull Floor floor, java.util.Map<java.lang.String,java.lang.Object> options, @NonNull Handler<android.graphics.Bitmap> callback)
Deprecated.Download the map image of a floor- Parameters:
floor
- the floor. Not null.options
- the request options. Can be null. Accepted options:CommunicationOptions.FORCE_DOWNLOAD
,CommunicationOptions.SERVER_FIRST
callback
- callback to asynchronously receive the image. Not null.
-
fetchIndoorPOIsFromBuilding
@Deprecated boolean fetchIndoorPOIsFromBuilding(@NonNull Building building, @NonNull Handler<java.util.Collection<Poi>> callback)
Deprecated.usefetchIndoorPOIsFromBuilding(String, Handler)
insteadDownload the indoor POIs of a building- Parameters:
building
- the building. Not null.callback
- Callback to asynchronously receive the points of interest. Not null.
-
fetchIndoorPOIsFromBuilding
@Deprecated boolean fetchIndoorPOIsFromBuilding(@NonNull Building building, java.util.Map<java.lang.String,java.lang.Object> options, @NonNull Handler<java.util.Collection<Poi>> callback)
Deprecated.Download the indoor POIs of a building- Parameters:
building
- the building. Not null.options
- the request options. Can be null. Accepted options:CommunicationOptions.FORCE_DOWNLOAD
,CommunicationOptions.SERVER_FIRST
,CommunicationOptions.PRELOAD_IMAGES
callback
- callback to asynchronously receive the points of interest. Not null.
-
fetchPoiCategories
@Deprecated boolean fetchPoiCategories(java.util.Map<java.lang.String,java.lang.Object> options, @NonNull Handler<java.util.Collection<PoiCategory>> callback)
Deprecated.usefetchPoiCategories(CommunicationConfig, Handler)
insteadGet all POI categories, download and cache their icons asynchronously.To get some of those icons from local storage use
fetchPoiCategoryIconNormal(PoiCategory, Handler)
orfetchPoiCategoryIconSelected(PoiCategory, Handler)
- Parameters:
options
- the request options. Can be null. Accepted options:CommunicationOptions.FORCE_DOWNLOAD
,CommunicationOptions.SERVER_FIRST
,CommunicationOptions.PRELOAD_IMAGES
callback
- Callback to asynchronously receive the POI categories
-
fetchPoiCategoryIconNormal
@Deprecated boolean fetchPoiCategoryIconNormal(@NonNull PoiCategory category, @NonNull Handler<android.graphics.Bitmap> callback)
Deprecated.Get the normal category icon for a category- Parameters:
category
- the category. Not null.callback
- the callback. Not null.
-
fetchPoiCategoryIconNormal
@Deprecated boolean fetchPoiCategoryIconNormal(@NonNull PoiCategory category, java.util.Map<java.lang.String,java.lang.Object> options, @NonNull Handler<android.graphics.Bitmap> callback)
Deprecated.Get the normal category icon for a category- Parameters:
category
- the category. Not null.options
- the request options. Can be null. Accepted options:CommunicationOptions.FORCE_DOWNLOAD
,CommunicationOptions.SERVER_FIRST
callback
- the callback. Not null.
-
fetchPoiCategoryIconSelected
@Deprecated boolean fetchPoiCategoryIconSelected(@NonNull PoiCategory category, @NonNull Handler<android.graphics.Bitmap> callback)
Deprecated.Get the selected category icon for a category- Parameters:
category
- the category. Not null.callback
- the callback. Not null.
-
fetchPoiCategoryIconSelected
@Deprecated boolean fetchPoiCategoryIconSelected(@NonNull PoiCategory category, java.util.Map<java.lang.String,java.lang.Object> options, @NonNull Handler<android.graphics.Bitmap> callback)
Deprecated.Get the selected category icon for a category- Parameters:
category
- the category. Not null.options
- the request options. Can be null. Accepted options: FORCE_DOWNLOAD (download regardless cache)callback
- the callback. Not null.
-
fetchOutdoorPOIsFromBuilding
@Deprecated boolean fetchOutdoorPOIsFromBuilding(@NonNull Building building, @NonNull Handler<java.util.Collection<Poi>> callback)
Deprecated.usefetchOutdoorPOIsFromBuilding(String, Handler)
insteadDownload the outdoor POIs of a building- Parameters:
building
- the building. Not null.callback
- Callback to asynchronously receive the points of interest. Not null.
-
fetchOutdoorPOIsFromBuilding
@Deprecated boolean fetchOutdoorPOIsFromBuilding(@NonNull Building building, java.util.Map<java.lang.String,java.lang.Object> options, @NonNull Handler<java.util.Collection<Poi>> callback)
Deprecated.Download the outdoor POIs of a building- Parameters:
building
- the building. Not null.options
- the request options. Can be null. Accepted options:CommunicationOptions.FORCE_DOWNLOAD
,CommunicationOptions.SERVER_FIRST
,CommunicationOptions.PRELOAD_IMAGES
callback
- Callback to asynchronously receive the points of interest. Not null.
-
fetchEventsFromBuilding
@Deprecated boolean fetchEventsFromBuilding(@NonNull Building building, @NonNull Handler<java.util.Collection<SitumEvent>> callback)
Deprecated.usefetchEventsFromBuilding(String, Handler)
insteadDownload the events of a building- Parameters:
building
- the building. Not null.callback
- Callback to asynchronously receive the events of a building. Not null.
-
fetchEventsFromBuilding
@Deprecated boolean fetchEventsFromBuilding(@NonNull Building building, java.util.Map<java.lang.String,java.lang.Object> options, @NonNull Handler<java.util.Collection<SitumEvent>> callback)
Deprecated.Download the events of a building- Parameters:
building
- the building. Not null.options
- the request options. Can be null. Accepted options:CommunicationOptions.FORCE_DOWNLOAD
,CommunicationOptions.SERVER_FIRST
callback
- Callback to asynchronously receive the events of a building. Not null.
-
eventSeen
@Deprecated boolean eventSeen(@NonNull SitumEvent event, @NonNull Handler<EventOccurrence> callback)
Deprecated.usecreateOccurrenceForEvent(SitumEvent, Handler)
insteadNotifies that the user has seen an event.- Parameters:
event
- event that has been seen. Not null.callback
- receives an event occurrence, necessary to notify a click and conversion of the same event. Not null.- See Also:
EventOccurrence
,eventClicked(EventOccurrence, Handler)
,eventConverted(EventOccurrence, Handler)
-
eventSeen
@Deprecated boolean eventSeen(@NonNull SitumEvent event, java.util.Map<java.lang.String,java.lang.Object> options, @NonNull Handler<EventOccurrence> callback)
Deprecated.usecreateOccurrenceForEvent(SitumEvent, Handler)
insteadNotifies that the user has seen an event.- Parameters:
event
- event that has been seen. Not null.options
- the request options. Can be null.callback
- receives an event occurrence, necessary to notify a click of the same event. Not null.- See Also:
EventOccurrence
,eventClicked(EventOccurrence, Handler)
-
eventClicked
@Deprecated boolean eventClicked(@NonNull EventOccurrence occurrence, @NonNull Handler<EventOccurrence> callback)
Deprecated.Notifies that the user has clicked a previously seen event. The time when the click was produced can be provided in theoccurrence
; if not,new Date()
is assumed.- Parameters:
occurrence
- object obtained when the event was seen (witheventSeen(SitumEvent, Handler)
). Not null. occurrence.getId() not null.callback
- receives the updated occurrence, necessary to notify a conversion of the same event. Not null.- See Also:
EventOccurrence
,eventConverted(EventOccurrence, Handler)
-
eventClicked
@Deprecated boolean eventClicked(@NonNull EventOccurrence occurrence, java.util.Map<java.lang.String,java.lang.Object> options, @NonNull Handler<EventOccurrence> callback)
Deprecated.Notifies that the user has clicked a previously seen event. The time when the click was produced can be provided in theoccurrence
; if not,new Date()
is assumed.- Parameters:
occurrence
- object obtained when the event was seen (witheventSeen(SitumEvent, Handler)
). Not null. occurrence.getId() not null.options
- the request options. Can be null.callback
- receives the updated occurrence, necessary to notify a conversion of the same event. Not null.- See Also:
eventConverted(EventOccurrence, Handler)
-
eventConverted
@Deprecated boolean eventConverted(@NonNull EventOccurrence occurrence, @NonNull Handler<EventOccurrence> callback)
Deprecated.Notifies that a previously seen and clicked event has been converted. The time when the conversion was produced can be provided in theoccurrence
; if not,new Date()
is assumed.- Parameters:
occurrence
- object obtained when the event was clicked (witheventClicked(EventOccurrence, Handler)
). Not null. occurrence.getId() and occurrence.getWhenClicked() can't be null neither.callback
- receives the updated occurrence. Not null.- See Also:
EventOccurrence
,eventConverted(EventOccurrence, Handler)
-
eventConverted
@Deprecated boolean eventConverted(@NonNull EventOccurrence occurrence, java.util.Map<java.lang.String,java.lang.Object> options, @NonNull Handler<EventOccurrence> callback)
Deprecated.Notifies that a previously seen and clicked event has been converted. The time when the conversion was produced can be provided in theoccurrence
; if not,new Date()
is assumed.- Parameters:
occurrence
- object obtained when the event was clicked (witheventClicked(EventOccurrence, Handler)
). Not null. occurrence.getId() and occurrence.getWhenClicked() can't be null neither.options
- the request options. Can be null.callback
- receives the updated occurrence. Not null.- See Also:
EventOccurrence
,eventConverted(EventOccurrence, Handler)
-
fetchGeofencesFromBuilding
@Deprecated boolean fetchGeofencesFromBuilding(@NonNull Building building, java.util.Map<java.lang.String,java.lang.Object> options, @NonNull Handler<java.util.List<Geofence>> callback)
Deprecated.Get the geofences of a building- Parameters:
building
- the building. Not null.options
- the request options. Can be null.callback
- the callback. Not null.
-
fetchCalibratedArea
@Deprecated boolean fetchCalibratedArea(@NonNull Building building, @NonNull Floor floor, @NonNull Handler<java.util.Collection<CalibrationArea>> callback)
Deprecated.UseCalibrationManager.fetchActiveGtScans(Floor, Handler)
Get the calibrated areas for a floor. This call will try to fetch the last updated data if possible.- Parameters:
building
- the building. Not nullfloor
- the floor. Not nullcallback
- the callback. Not null
-
fetchCalibrationWifiScans
@Deprecated boolean fetchCalibrationWifiScans(@NonNull Building building, @NonNull Floor floor, @NonNull Handler<Scans> callback)
Deprecated.UseCalibrationManager.fetchActiveWifiScans(Floor, Handler)
Get the wifi scanned points for a floor. This call will try to fetch the last updated data if possible.- Parameters:
building
- the building. Not nullfloor
- the floor. Not nullcallback
- the callback. Not null
-
fetchCalibrationBleScans
@Deprecated boolean fetchCalibrationBleScans(@NonNull Building building, @NonNull Floor floor, @NonNull Handler<Scans> callback)
Deprecated.UseCalibrationManager.fetchActiveBleScans(Floor, Handler)
Get the BLE scanned points for a floor. This call will try to fetch the last updated data if possible.- Parameters:
building
- the building. Not nullfloor
- the floor. Not nullcallback
- the callback. Not null
-
fetchRailWidth
@Deprecated boolean fetchRailWidth(@NonNull Building building, @NonNull Handler<java.lang.Float> callback)
Deprecated.usefetchRailWidth(String, Handler)
insteadGet the calibrations rail width used in a building- Parameters:
building
- the building. Not nullcallback
- the callback. Not null
-
updateRailWidth
@Deprecated boolean updateRailWidth(@NonNull Building building, float railWidth, @NonNull Handler<java.lang.Object> callback)
Deprecated.useupdateRailWidth(String, float, Handler)
insteadUpdate the calibrations rail width for a building- Parameters:
building
- the building. Not nullrailWidth
- the new rail widthcallback
- the callback. Not null
-
-