Get loaded notifications
It is possible to retrieve the list of notifications and geotriggers the Plot library is currently listening to. You can, for example, use this to show the user what is near him. This can also be used to see what Plot has loaded for debugging purposes.
Please note that this is an optional feature and not needed in order for the Plot library to work.
Android¶
The plugin exposes two method: Plot.getLoadedNotifications()
and Plot.getLoadedGeotriggers()
. Fields like notification message, latitude, longitude, data are available.
When no notifications are loaded an empty list is returned. This could for example be the case when the location of the device is unknown.
Appcelerator¶
The plugin exposes two method: getLoadedNotifications()
and getLoadedGeotriggers()
. Fields like notification message, latitude, longitude, data are available.
When no notifications are loaded an empty list is returned. This could for example be the case when the location of the device is unknown.
An example implementation would be:
var plot = require('com.plotprojects.ti');
var cachedNotifications = plot.getLoadedNotifications();
var cachedGeotriggers = plot.getLoadedGeotriggers();
Phonegap¶
The plugin exposes two method: loadedNotifications(callback)
and loadedGeotriggers(callback)
. Fields like notification message, latitude, longitude, data are available.
When no notifications are loaded an empty list is returned. This could for example be the case when the location of the device is unknown.
An example implementation would be:
plot.loadedNotifications(function(notifications) {
// Do something with the notifications
});
plot.loadedGeotriggers(function(geotriggers) {
// Do something with the geotriggers
});