public interface CommunicationManager
Modifier and Type | Method and Description |
---|---|
boolean |
eventClicked(EventOcurrence ocurrence,
Handler<EventOcurrence> callback)
Notifies that the user has clicked a previously seen event.
|
boolean |
eventClicked(EventOcurrence ocurrence,
Map<String,Object> options,
Handler<EventOcurrence> callback)
Notifies that the user has clicked a previously seen event.
|
boolean |
eventConverted(EventOcurrence ocurrence,
Handler<EventOcurrence> callback)
Notifies that a previously seen and clicked event has been converted.
|
boolean |
eventConverted(EventOcurrence ocurrence,
Map<String,Object> options,
Handler<EventOcurrence> callback)
Notifies that a previously seen and clicked event has been converted.
|
boolean |
eventSeen(SitumEvent event,
Handler<EventOcurrence> callback)
Notifies that the user has seen an event.
|
boolean |
eventSeen(SitumEvent event,
Map<String,Object> options,
Handler<EventOcurrence> callback)
Notifies that the user has seen an event.
|
boolean |
fetchBuildingInfo(Building building,
Handler<BuildingInfo> callback)
Download all building data from the selected building.
|
boolean |
fetchBuildingInfo(Building building,
Map<String,Object> options,
Handler<BuildingInfo> callback)
Download all building data from the selected building.
|
boolean |
fetchBuildings(Handler<Collection<Building>> callback)
Download all buildings for user
|
boolean |
fetchBuildings(Map<String,Object> options,
Handler<Collection<Building>> callback)
Download all buildings for user
|
boolean |
fetchEventsFromBuilding(Building building,
Handler<Collection<SitumEvent>> callback)
Download the events of a building from Situm Indoor Maps Server
|
boolean |
fetchEventsFromBuilding(Building building,
Map<String,Object> options,
Handler<Collection<SitumEvent>> callback)
Download the events of a building from Situm Indoor Maps Server
|
boolean |
fetchFloorsFromBuilding(Building building,
Handler<Collection<Floor>> callback)
Download all floors for a building
|
boolean |
fetchFloorsFromBuilding(Building building,
Map<String,Object> options,
Handler<Collection<Floor>> callback)
Download all floors for a building
|
boolean |
fetchIndoorPOIsFromBuilding(Building building,
Handler<Collection<Poi>> callback)
Download the indoor POIs of a building
|
boolean |
fetchIndoorPOIsFromBuilding(Building building,
Map<String,Object> options,
Handler<Collection<Poi>> callback)
Download the indoor POIs of a building
|
boolean |
fetchMapFromFloor(Floor floor,
Handler<android.graphics.Bitmap> callback)
Download the map image of a floor from Situm Indoor Maps Server as a Bitmap
|
boolean |
fetchMapFromFloor(Floor floor,
Map<String,Object> options,
Handler<android.graphics.Bitmap> callback)
Download the map image of a floor from Situm Indoor Maps Server as a Bitmap
|
boolean |
fetchOutdoorPOIsFromBuilding(Building building,
Handler<Collection<Poi>> callback)
Download the outdoor POIs of a building
|
boolean |
fetchOutdoorPOIsFromBuilding(Building building,
Map<String,Object> options,
Handler<Collection<Poi>> callback)
Download the outdoor POIs of a building
|
boolean |
fetchPoiCategories(Handler<Collection<PoiCategory>> callback)
Get all POI categories, and download and cache their icons asynchronously
|
boolean |
fetchPoiCategories(Map<String,Object> options,
Handler<Collection<PoiCategory>> callback)
Get all POI categories, and download and cache their icons asynchronously.
|
boolean |
fetchPoiCategoryIconNormal(PoiCategory category,
Handler<android.graphics.Bitmap> callback)
Get the normal category Bitmap icon for a category
|
boolean |
fetchPoiCategoryIconNormal(PoiCategory category,
Map<String,Object> options,
Handler<android.graphics.Bitmap> callback)
Get the normal category Bitmap icon for a category
|
boolean |
fetchPoiCategoryIconSelected(PoiCategory category,
Handler<android.graphics.Bitmap> callback)
Get the selected category Bitmap icon for a category
|
boolean |
fetchPoiCategoryIconSelected(PoiCategory category,
Map<String,Object> options,
Handler<android.graphics.Bitmap> callback)
Get the selected category Bitmap icon for a category
|
HttpRequestExecutor |
getHttpRequestExecutor() |
void |
invalidateCache() |
boolean |
logout(Handler<Object> callback)
Invalidate user's token and remove it from internal credentials, if exist.
|
boolean |
validateUserCredentials(Handler<Object> callback)
Check if user credentials previously set with
Configuration.setUserPass(String, String) from SitumSdk.configuration() are right. |
boolean validateUserCredentials(Handler<Object> callback)
Configuration.setUserPass(String, String)
from SitumSdk.configuration()
are right.callback
- invoked when login is finishedboolean logout(Handler<Object> callback)
callback
- invoked when logout is finishedboolean fetchBuildings(Handler<Collection<Building>> callback)
callback
- Callback to asynchronously receive the buildings. Not null.boolean fetchBuildings(Map<String,Object> options, Handler<Collection<Building>> callback)
options
- the request options. Can be null. Accepted options: FORCE_DOWNLOADcallback
- 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, Map<String,Object> options, Handler<BuildingInfo> callback)
building
- selected building for download info. Not null.options
- the request options. Can be null. Accepted options: FORCE_DOWNLOAD (download regardless cache)callback
- Callback to asynchronously receive the buildings. Not null.boolean fetchFloorsFromBuilding(Building building, Handler<Collection<Floor>> callback)
building
- the building. Not null.callback
- Callback to asynchronously receive the floors. Not null.boolean fetchFloorsFromBuilding(Building building, Map<String,Object> options, Handler<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<android.graphics.Bitmap> callback)
floor
- the floor. Not null.callback
- callback to asynchronously receive the image Bitmap. Not null.boolean fetchMapFromFloor(Floor floor, Map<String,Object> options, Handler<android.graphics.Bitmap> callback)
floor
- the floor. Not null.options
- the request options. Can be null. Accepted options: FORCE_DOWNLOAD (download regardless cache)callback
- callback to asynchronously receive the image Bitmap. Not null.boolean fetchIndoorPOIsFromBuilding(Building building, Handler<Collection<Poi>> callback)
building
- the building. Not null.callback
- Callback to asynchronously receive the points of interest. Not null.boolean fetchIndoorPOIsFromBuilding(Building building, Map<String,Object> options, Handler<Collection<Poi>> 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 points of interest. Not null.boolean fetchPoiCategories(Handler<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(Map<String,Object> options, Handler<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: FORCE_DOWNLOAD (download regardless cache)callback
- Callback to asynchronously receive the POI categoriesboolean fetchPoiCategoryIconNormal(PoiCategory category, Handler<android.graphics.Bitmap> callback)
category
- the category. Not null.callback
- the callback. Not null.boolean fetchPoiCategoryIconNormal(PoiCategory category, Map<String,Object> options, Handler<android.graphics.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 fetchPoiCategoryIconSelected(PoiCategory category, Handler<android.graphics.Bitmap> callback)
category
- the category. Not null.callback
- the callback. Not null.boolean fetchPoiCategoryIconSelected(PoiCategory category, Map<String,Object> options, Handler<android.graphics.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<Collection<Poi>> callback)
building
- the building. Not null.callback
- Callback to asynchronously receive the points of interest. Not null.boolean fetchOutdoorPOIsFromBuilding(Building building, Map<String,Object> options, Handler<Collection<Poi>> 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 points of interest. Not null.boolean fetchEventsFromBuilding(Building building, Handler<Collection<SitumEvent>> callback)
building
- the building. Not null.callback
- Callback to asynchronously receive the events of a building. Not null.boolean fetchEventsFromBuilding(Building building, Map<String,Object> options, Handler<Collection<SitumEvent>> 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 events of a building. Not null.boolean eventSeen(SitumEvent event, Handler<EventOcurrence> 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.EventOcurrence}, {@link #eventClicked(EventOcurrence, Handler)}, {@link #eventConverted(EventOcurrence, Handler)}
boolean eventSeen(SitumEvent event, Map<String,Object> options, Handler<EventOcurrence> 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.EventOcurrence}, {@link #eventClicked(EventOcurrence, Handler)}
boolean eventClicked(EventOcurrence ocurrence, Handler<EventOcurrence> callback)
ocurrence
; if not, new Date()
is assumed.ocurrence
- object obtained when the event was seen (with eventSeen(SitumEvent, Handler)
). Not null. ocurrence.getId() not null.callback
- receives the updated occurrence, necessary to notify a conversion of the same event. Not null.EventOcurrence}, {@link #eventConverted(EventOcurrence, Handler)}
boolean eventClicked(EventOcurrence ocurrence, Map<String,Object> options, Handler<EventOcurrence> callback)
ocurrence
; if not, new Date()
is assumed.ocurrence
- object obtained when the event was seen (with eventSeen(SitumEvent, Handler)
). Not null. ocurrence.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.EventOcurrence}, {@link #eventConverted(EventOcurrence, Handler)}
boolean eventConverted(EventOcurrence ocurrence, Handler<EventOcurrence> callback)
ocurrence
; if not, new Date()
is assumed.ocurrence
- object obtained when the event was clicked (with eventClicked(EventOcurrence, Handler)
). Not null. ocurrence.getId() and ocurrence.getWhenClicked() can't be null neither.callback
- receives the updated occurrence. Not null.EventOcurrence}, {@link #eventConverted(EventOcurrence, Handler)}
boolean eventConverted(EventOcurrence ocurrence, Map<String,Object> options, Handler<EventOcurrence> callback)
ocurrence
; if not, new Date()
is assumed.ocurrence
- object obtained when the event was clicked (with eventClicked(EventOcurrence, Handler)
). Not null. ocurrence.getId() and ocurrence.getWhenClicked() can't be null neither.options
- the request options. Can be null.callback
- receives the updated occurrence. Not null.EventOcurrence}, {@link #eventConverted(EventOcurrence, Handler)}
void invalidateCache()
HttpRequestExecutor getHttpRequestExecutor()