Startup and Shutdown events run, naturally, whenever a session starts or ends. In each case, the gateway will have access to the session object associated with the section, complete with all session properties.
When designing a startup or shutdown event script:
Closing the browser tab with the session will not immediately close the session; the session must first time out.
Startup and Shutdown Example
This example will record the session start and end time to the database.
Test the Example
To test the example, open the Perspective App on your mobile device and load the project.
When the Perspective App is running on a mobile device, it enables users to use tools available on the device, such as GPS location data, the camera, or the accelerometer. The remaining session events are designed specifically to handle the three Native App Actions.
The Bluetooth Data Received event is only used when a session is running in a native application and it has received bluetooth advertising data. This session event script sends Bluetooth advertising data to Perspective. It supports iBeacon and Eddystone formats.
Bluetooth "Advertising Data" is the name of the communication data according to the Bluetooth spec. There is no connection to advertising as an industry.
|session||An object that references the Project Session|
List of buffered advertising data. The data comes in as a data object, which has various parts. The following is example output.
The Message Handler scripts will run whenever the session receives a message from system.util.sendMessage or system.util.sendRequest. Note that these types of message handlers are different than component-based message handlers, which are accessed with system.perspective.sendMessage. Session Message Handlers can not be called by system.perspective.sendMessage.
|session||The Perspective Session that is handling this message.|
A dictionary that holds the objects passed to this message handler.
Need tech person to help with an example