public interface CommunicationManager
Modifier and Type | Interface and Description |
---|---|
static interface |
CommunicationManager.Code
The error codes received in
Handler.onFailure(Error) on the CommunicationManager |
static interface |
CommunicationManager.PropertyKey |
Modifier and Type | Method and Description |
---|---|
boolean |
eventClicked(EventOccurrence occurrence,
Handler<EventOccurrence> callback)
Notifies that the user has clicked a previously seen event.
|
boolean |
eventClicked(EventOccurrence occurrence,
java.util.Map<java.lang.String,java.lang.Object> options,
Handler<EventOccurrence> callback)
Notifies that the user has clicked a previously seen event.
|
boolean |
eventConverted(EventOccurrence occurrence,
Handler<EventOccurrence> callback)
Notifies that a previously seen and clicked event has been converted.
|
boolean |
eventConverted(EventOccurrence occurrence,
java.util.Map<java.lang.String,java.lang.Object> options,
Handler<EventOccurrence> callback)
Notifies that a previously seen and clicked event has been converted.
|
boolean |
eventSeen(SitumEvent event,
Handler<EventOccurrence> callback)
Notifies that the user has seen an event.
|
boolean |
eventSeen(SitumEvent event,
java.util.Map<java.lang.String,java.lang.Object> options,
Handler<EventOccurrence> callback)
Notifies that the user has seen an event.
|
boolean |
fetchBuildingInfo(Building building,
Handler<BuildingInfo> callback)
Download all the building data for the selected building.
|
boolean |
fetchBuildingInfo(Building building,
java.util.Map<java.lang.String,java.lang.Object> options,
Handler<BuildingInfo> callback)
Download all the building data from the selected building.
|
boolean |
fetchBuildings(Handler<java.util.Collection<Building>> callback)
Download all the buildings for the current user
|
boolean |
fetchBuildings(java.util.Map<java.lang.String,java.lang.Object> options,
Handler<java.util.Collection<Building>> callback)
Download all the buildings for the current user
|
boolean |
fetchCalibratedArea(Building building,
Floor floor,
Handler<java.util.Collection<CalibrationArea>> callback)
Deprecated.
Use
es.situm.sdk.calibration.CalibrationManager#fetchActiveGtScans(Floor, Handler) |
boolean |
fetchCalibrationBleScans(Building building,
Floor floor,
Handler<Scans> callback)
Deprecated.
Use
es.situm.sdk.calibration.CalibrationManager#fetchActiveBleScans(Floor, Handler) |
boolean |
fetchCalibrationWifiScans(Building building,
Floor floor,
Handler<Scans> callback)
Deprecated.
Use
es.situm.sdk.calibration.CalibrationManager#fetchActiveWifiScans(Floor, Handler) |
boolean |
fetchEventsFromBuilding(Building building,
Handler<java.util.Collection<SitumEvent>> callback)
Download the events of a building
|
boolean |
fetchEventsFromBuilding(Building building,
java.util.Map<java.lang.String,java.lang.Object> options,
Handler<java.util.Collection<SitumEvent>> callback)
Download the events of a building
|
boolean |
fetchFloorsFromBuilding(Building building,
Handler<java.util.Collection<Floor>> callback)
Download all the floors of a building
|
boolean |
fetchFloorsFromBuilding(Building building,
java.util.Map<java.lang.String,java.lang.Object> options,
Handler<java.util.Collection<Floor>> callback)
Download all the floors of a building
|
boolean |
fetchIndoorPOIsFromBuilding(Building building,
Handler<java.util.Collection<Poi>> callback)
Download the indoor POIs of a building
|
boolean |
fetchIndoorPOIsFromBuilding(Building building,
java.util.Map<java.lang.String,java.lang.Object> options,
Handler<java.util.Collection<Poi>> callback)
Download the indoor POIs of a building
|
boolean |
fetchMapFromFloor(Floor floor,
Handler<Bitmap> callback)
Download the map image of a floor
|
boolean |
fetchMapFromFloor(Floor floor,
java.util.Map<java.lang.String,java.lang.Object> options,
Handler<Bitmap> callback)
Download the map image of a floor
|
boolean |
fetchOutdoorPOIsFromBuilding(Building building,
Handler<java.util.Collection<Poi>> callback)
Download the outdoor POIs of a building
|
boolean |
fetchOutdoorPOIsFromBuilding(Building building,
java.util.Map<java.lang.String,java.lang.Object> options,
Handler<java.util.Collection<Poi>> callback)
Download the outdoor POIs of a building
|
boolean |
fetchPoiCategories(Handler<java.util.Collection<PoiCategory>> callback)
Get all POI categories, download and cache their icons asynchronously
|
boolean |
fetchPoiCategories(java.util.Map<java.lang.String,java.lang.Object> options,
Handler<java.util.Collection<PoiCategory>> callback)
Get all POI categories, download and cache their icons asynchronously.
|
boolean |
fetchPoiCategoryIconNormal(PoiCategory category,
Handler<Bitmap> callback)
Get the normal category icon for a category
|
boolean |
fetchPoiCategoryIconNormal(PoiCategory category,
java.util.Map<java.lang.String,java.lang.Object> options,
Handler<Bitmap> callback)
Get the normal category icon for a category
|
boolean |
fetchPoiCategoryIconSelected(PoiCategory category,
Handler<Bitmap> callback)
Get the selected category icon for a category
|
boolean |
fetchPoiCategoryIconSelected(PoiCategory category,
java.util.Map<java.lang.String,java.lang.Object> options,
Handler<Bitmap> callback)
Get the selected category icon for a category
|
boolean |
fetchRailWidth(Building building,
Handler<java.lang.Float> callback)
Get the calibrations rail width used in a building
|
HttpRequestExecutor |
getHttpRequestExecutor()
Return the HTTP Request Executor to make custom requests to the Dashboard
|
void |
invalidateCache()
Invalidate all the resources in the cache
|
boolean |
logout(Handler<java.lang.Object> callback)
Invalidate user's token and remove it from internal credentials, if exist.
|
boolean |
updateRailWidth(Building building,
float railWidth,
Handler<java.lang.Object> callback)
Update the calibrations rail width for a building
|
boolean |
validateUserCredentials(Handler<java.lang.Object> callback)
Check if the user credentials previously set with
Configuration.setUserPass(String, String) , SitumSdk.configuration()
or in the AndroidManifest.xml are right. |
boolean validateUserCredentials(Handler<java.lang.Object> callback)
Configuration.setUserPass(String, String)
, SitumSdk.configuration()
or in the AndroidManifest.xml are right.callback
- invoked when login is finished. If the user and/or password/api key aren't valid a
CommunicationManager.Code.HTTP_UNAUTHORIZED
will be received
in Handler.onFailure(Error)
boolean logout(Handler<java.lang.Object> callback)
callback
- invoked when logout is finishedboolean fetchBuildings(Handler<java.util.Collection<Building>> callback)
callback
- Callback to asynchronously receive the buildings. Not null.boolean fetchBuildings(java.util.Map<java.lang.String,java.lang.Object> options, Handler<java.util.Collection<Building>> callback)
options
- the request options. Can be null. Accepted options: CommunicationOptions.FORCE_DOWNLOAD
, CommunicationOptions.SERVER_FIRST
callback
- Callback to asynchronously receive the buildings. Not null.boolean fetchBuildingInfo(Building building, Handler<BuildingInfo> callback)
building
- selected building for download info. Not null.callback
- Callback to asynchronously receive the buildings. Not null.boolean fetchBuildingInfo(Building building, java.util.Map<java.lang.String,java.lang.Object> options, Handler<BuildingInfo> callback)
building
- selected building for download info. Not null.options
- the request options. Can be null. Accepted options: CommunicationOptions.FORCE_DOWNLOAD
, CommunicationOptions.SERVER_FIRST
callback
- Callback to asynchronously receive the buildings. Not null.boolean fetchFloorsFromBuilding(Building building, Handler<java.util.Collection<Floor>> callback)
building
- the building. Not null.callback
- Callback to asynchronously receive the floors. Not null.boolean fetchFloorsFromBuilding(Building building, java.util.Map<java.lang.String,java.lang.Object> options, Handler<java.util.Collection<Floor>> callback)
building
- the building. Not null.options
- the request options. Can be null. Accepted options: FORCE_DOWNLOAD (download regardless cache)callback
- Callback to asynchronously receive the floors. Not null.boolean fetchMapFromFloor(Floor floor, Handler<Bitmap> callback)
floor
- the floor. Not null.callback
- callback to asynchronously receive the floor image. Not null.boolean fetchMapFromFloor(Floor floor, java.util.Map<java.lang.String,java.lang.Object> options, Handler<Bitmap> callback)
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.boolean fetchIndoorPOIsFromBuilding(Building building, Handler<java.util.Collection<Poi>> callback)
building
- the building. Not null.callback
- Callback to asynchronously receive the points of interest. Not null.boolean fetchIndoorPOIsFromBuilding(Building building, java.util.Map<java.lang.String,java.lang.Object> options, Handler<java.util.Collection<Poi>> callback)
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 points of interest. Not null.boolean fetchPoiCategories(Handler<java.util.Collection<PoiCategory>> callback)
To get some of those icons from local storage use fetchPoiCategoryIconNormal(PoiCategory, Handler)
or fetchPoiCategoryIconSelected(PoiCategory, Handler)
callback
- Callback to asynchronously receive the POI categories. Not null.boolean fetchPoiCategories(java.util.Map<java.lang.String,java.lang.Object> options, Handler<java.util.Collection<PoiCategory>> callback)
To get some of those icons from local storage use fetchPoiCategoryIconNormal(PoiCategory, Handler)
or fetchPoiCategoryIconSelected(PoiCategory, Handler)
options
- the request options. Can be null. Accepted options: CommunicationOptions.FORCE_DOWNLOAD
, CommunicationOptions.SERVER_FIRST
callback
- Callback to asynchronously receive the POI categoriesboolean fetchPoiCategoryIconNormal(PoiCategory category, Handler<Bitmap> callback)
category
- the category. Not null.callback
- the callback. Not null.boolean fetchPoiCategoryIconNormal(PoiCategory category, java.util.Map<java.lang.String,java.lang.Object> options, Handler<Bitmap> callback)
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.boolean fetchPoiCategoryIconSelected(PoiCategory category, Handler<Bitmap> callback)
category
- the category. Not null.callback
- the callback. Not null.boolean fetchPoiCategoryIconSelected(PoiCategory category, java.util.Map<java.lang.String,java.lang.Object> options, Handler<Bitmap> callback)
category
- the category. Not null.options
- the request options. Can be null. Accepted options: FORCE_DOWNLOAD (download regardless cache)callback
- the callback. Not null.boolean fetchOutdoorPOIsFromBuilding(Building building, Handler<java.util.Collection<Poi>> callback)
building
- the building. Not null.callback
- Callback to asynchronously receive the points of interest. Not null.boolean fetchOutdoorPOIsFromBuilding(Building building, java.util.Map<java.lang.String,java.lang.Object> options, Handler<java.util.Collection<Poi>> callback)
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 points of interest. Not null.boolean fetchEventsFromBuilding(Building building, Handler<java.util.Collection<SitumEvent>> callback)
building
- the building. Not null.callback
- Callback to asynchronously receive the events of a building. Not null.boolean fetchEventsFromBuilding(Building building, java.util.Map<java.lang.String,java.lang.Object> options, Handler<java.util.Collection<SitumEvent>> callback)
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.boolean eventSeen(SitumEvent event, Handler<EventOccurrence> callback)
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.EventOccurrence
,
eventClicked(EventOccurrence, Handler)
,
eventConverted(EventOccurrence, Handler)
boolean eventSeen(SitumEvent event, java.util.Map<java.lang.String,java.lang.Object> options, Handler<EventOccurrence> callback)
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.EventOccurrence
,
eventClicked(EventOccurrence, Handler)
boolean eventClicked(EventOccurrence occurrence, Handler<EventOccurrence> callback)
occurrence
; if not, new Date()
is assumed.occurrence
- object obtained when the event was seen (with eventSeen(SitumEvent, Handler)
). Not null. occurrence.getId() not null.callback
- receives the updated occurrence, necessary to notify a conversion of the same event. Not null.EventOccurrence
,
eventConverted(EventOccurrence, Handler)
boolean eventClicked(EventOccurrence occurrence, java.util.Map<java.lang.String,java.lang.Object> options, Handler<EventOccurrence> callback)
occurrence
; if not, new Date()
is assumed.occurrence
- object obtained when the event was seen (with eventSeen(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.eventConverted(EventOccurrence, Handler)
boolean eventConverted(EventOccurrence occurrence, Handler<EventOccurrence> callback)
occurrence
; if not, new Date()
is assumed.occurrence
- object obtained when the event was clicked (with eventClicked(EventOccurrence, Handler)
). Not null. occurrence.getId() and occurrence.getWhenClicked() can't be null neither.callback
- receives the updated occurrence. Not null.EventOccurrence
,
3eventConverted( EventOccurrence , Handler)
boolean eventConverted(EventOccurrence occurrence, java.util.Map<java.lang.String,java.lang.Object> options, Handler<EventOccurrence> callback)
occurrence
; if not, new Date()
is assumed.occurrence
- object obtained when the event was clicked (with eventClicked(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.EventOccurrence
,
eventConverted(EventOccurrence, Handler)
@Deprecated boolean fetchCalibratedArea(Building building, Floor floor, Handler<java.util.Collection<CalibrationArea>> callback)
es.situm.sdk.calibration.CalibrationManager#fetchActiveGtScans(Floor, Handler)
building
- the building. Not nullfloor
- the floor. Not nullcallback
- the callback. Not null@Deprecated boolean fetchCalibrationWifiScans(Building building, Floor floor, Handler<Scans> callback)
es.situm.sdk.calibration.CalibrationManager#fetchActiveWifiScans(Floor, Handler)
building
- the building. Not nullfloor
- the floor. Not nullcallback
- the callback. Not null@Deprecated boolean fetchCalibrationBleScans(Building building, Floor floor, Handler<Scans> callback)
es.situm.sdk.calibration.CalibrationManager#fetchActiveBleScans(Floor, Handler)
building
- the building. Not nullfloor
- the floor. Not nullcallback
- the callback. Not nullboolean fetchRailWidth(Building building, Handler<java.lang.Float> callback)
building
- the building. Not nullcallback
- the callback. Not nullboolean updateRailWidth(Building building, float railWidth, Handler<java.lang.Object> callback)
building
- the building. Not nullrailWidth
- the new rail widthcallback
- the callback. Not nullvoid invalidateCache()
HttpRequestExecutor getHttpRequestExecutor()