TRIGGERS¶
There are some functions that can be called from any lua rules, and that are binded to certain events. When one of these events gets triggered, the corresponding function gets called with the indicated parameter.
Members¶
-
onGmailMailEvent(GmailMailEvent)¶ “Called when a new mail is received from a gmail pubsub. Obviously proper auth and gmail.startPubSub() call are needed.”
Parameters: event (GmailMailEvent) – event that holds info about new mail
-
onBatteryLowLevelEvent()¶ “Called when device battery goes below a threshold (android defined).”
-
onBatteryPowerDisconnectedEvent()¶ “Called when ac gets disconnected from device.”
-
onBatteryPowerConnectedEvent()¶ “Called when ac gets connected to device.”
-
onGcalendarEvent(GcalendarEvent)¶ “Called when a new gcalendar event is received from a gcalendar pubsub. Obviously proper auth and gcalendar.startPubSub() call are needed.”
Parameters: event (GcalendarEvent) – event that holds info about new calendar event
-
onGcalendarTimeoutEvent(GcalendarEvent)¶ “Called when the alarm created on a gcalendarEvent with gcalendar.scheduleAlarm() expires.”
Parameters: event (GcalendarEvent) – event that holds info about the calendar event
-
onFacebookPostEvent(FacebookPostEvent)¶ “Called when a new post is received from facebook subscription. Obviously it needs proper facebook auth and subscription.”
Parameters: event (FacebookPostEvent) – event that holds info about new facebook post
-
onLocationGeofenceTriggerEvent(LocationGeofenceTriggerEvent)¶ “Called when a geofence gets triggered. Geofence has to be created with location.addGeofence() method.”
Parameters: event (LocationGeofenceTriggerEvent) – event that holds info about geofence trigger.
-
onUserAtHomeEvent()¶ “Called when user is detected entering home. Our sdk provides this function without any need to manually add any geofence.”
-
onUserAtWorkEvent()¶ “Called when user is detected entering work place. Our sdk provides this function without any need to manually add any geofence.”
-
onUserLeftHomeEvent()¶ “Called when user is detected leaving home. Our sdk provides this function without any need to manually add any geofence.”
-
onUserLeftWorkEvent()¶ “Called when user is detected leaving work place. Our sdk provides this function without any need to manually add any geofence.”
-
onHeadsetPlugEvent()¶ “Called when device detects headset plugging.”
-
onWifiEnabledEvent()¶ “Called when device’s wifi get enabled.”