java.lang.Object | |
↳ | com.mapsted.alerts.MapstedAlertsApi |
MapstedAlertsApi class is used to get alerts for a property. It also provides callbacks for alerts which should be activated based on user position transition in the property. Use Mapsted Hub dashboard to setup the alerts for your property.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
class | MapstedAlertsApi.EventsImpl | ||||||||||
class | MapstedAlertsApi.ViewsImpl |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean | addActiveAlertChangeListener(MapUiApi.AlertChangeListener listener) | ||||||||||
boolean |
addAlertsOnChangeListener(AlertsOnChangeListener listener)
Register onChangeListener for property user is interested in but not necessarily at the property.
| ||||||||||
boolean |
addScheduledAlertTriggerListener(AlertsApi.ScheduledAlertTriggerListener listener)
Set callback for when scheduled alerts triggers while the user is at a property.
| ||||||||||
void |
createAlertListPartialFragment(List<String> alertIds, Consumer<Fragment> fragmentConsumer)
Create partial fragment alert list for given alertIds
| ||||||||||
boolean | displayAlertListDialog(List<String> alertIds, FragmentManager fragmentManager, Consumer<EntityZone> entityZoneSelection) | ||||||||||
AlertsApi.Events | events() | ||||||||||
void |
getActiveAlerts(int propertyId, Consumer<List<String>> consumer)
Get the list of active alerts by propertyId
| ||||||||||
Fragment | getEntityAlertListFragment(Entity entity) | ||||||||||
boolean | hasAlerts(Entity selectedEntity) | ||||||||||
AlertsApi.Lifecycle | lifecycle() | ||||||||||
static AlertsApi |
newInstance(Context context, CoreApi coreApi)
Create a new AlertsApi instance
| ||||||||||
static AlertsApi |
newInstance(Context context, MapUiApi mapUiApi)
Create a new AlertsApi instance
| ||||||||||
boolean | removeActiveAlertChangeListener(MapUiApi.AlertChangeListener listener) | ||||||||||
boolean |
removeAlertsOnChangeListener(AlertsOnChangeListener listener)
Unregister a previously registered callback.
| ||||||||||
boolean |
removeScheduledAlertTriggerListener(AlertsApi.ScheduledAlertTriggerListener listener)
Remove callback for when scheduled alerts triggers while the user is at a property.
| ||||||||||
AlertsApi.Repo | repo() | ||||||||||
AlertsApi.Setup | setup() | ||||||||||
void | showAlertDialogForEntity(Entity entity, FragmentManager fragmentManager, Consumer<EntityZone> entityZoneSelection) | ||||||||||
AlertsApi.Views | views() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Register onChangeListener for property user is interested in but not necessarily at the property.
Set callback for when scheduled alerts triggers while the user is at a property.
listener | callback with the ScheduledAlert that got triggered. |
---|
Create partial fragment alert list for given alertIds
alertIds | the alerts to populate |
---|---|
fragmentConsumer | the created fragment (nullable) |
Get the list of active alerts by propertyId
propertyId | the property of interest |
---|
Create a new AlertsApi instance
context | application context |
---|---|
coreApi | an initialized coreApi |
Create a new AlertsApi instance
context | application context |
---|---|
mapUiApi | an initialized mapUiApi |
Unregister a previously registered callback.
Remove callback for when scheduled alerts triggers while the user is at a property.
listener | callback with the ScheduledAlert that got triggered. |
---|