# Event Information

The Support Application generates different events, with each event containing specific data points. Some data points are common to all events.

## Events <a href="#events" id="events"></a>

The following details the different events that are supported.

### appLog <a href="#applog" id="applog"></a>

A custom application log used by individual applications to indicate an action has occurred.

| Field           | Data Type | Description                                                                                                         |
| --------------- | --------- | ------------------------------------------------------------------------------------------------------------------- |
| airplaneMode    | Boolean   | Indicates whether the device currently has airplane mode enabled.                                                   |
| cellularState   | String    | Indicates the current state of the device's cellular service (i.e., 'CONNECTED' and 'DISCONNECTED').                |
| network         | Object    | Collection of wifi information that includes whether or not wifi is enabled.                                        |
| details.tag     | String    | Defines a category for the applog event occurring (e.g. `"loginStart"`, `userReauth`, `RemoteSessionInfo`, etc.).   |
| details.message | String    | Additional information on the logged event. Often logged JSON data or a brief description such as an error message. |
| details.package | String    | Package name of the application logging the event.                                                                  |

[Example Event](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/technical-guide/event-information#applog)

### appUsage <a href="#appusage" id="appusage"></a>

This event indicates the usage of an application. The event is generated when the user changes to another application, and will log the details of the previous application.

Example steps:

1. User is in Launcher, logs in.
2. User opens an application A (calculator, or any other app). Uses the app for at least a few seconds.
3. User goes back to Launcher. The agent should generate an appusage event for the application that was previously opened.

| Field            | Data Type | Description                                                                         |
| ---------------- | --------- | ----------------------------------------------------------------------------------- |
| startTime        | Date/Time | Calculated start time of the application launch.                                    |
| endTime          | Date/Time | Date/Time when application went into background.                                    |
| duration         | long      | Length of time, in seconds, that the application was in the foreground.             |
| screenOnDuration | long      | Length of time, in seconds, that the screen was on while application in foreground. |
| packageName      | String    | Name of the package representing the application.                                   |
| packageLabel     | String    | The display name of an application.                                                 |

[Example Event](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/technical-guide/event-examples#appusage)

### appUsage\_history <a href="#appusage_history" id="appusage_history"></a>

This event provides application usage for a time period range.

| Field           | Type   | Description                                                   |
| --------------- | ------ | ------------------------------------------------------------- |
| details.message | String | An JSON object with execution time and array of applications. |

The details.message column will contain a JSON object with the begin and end date ranges, and a data array of objects. Each entry in the array will indicate a different application.

```
{
    beginDate: 'the beginning of the date range',
    data: [
        {
            "packageName":  name of the package,
            "foregroundServiceUsed": number of seconds foreground services executed
            "inForeground": number of seconds in foreground,
            "timeVisible": number of seconds visible
        }
    ],
    endDate: 'the end of the date range'
}
```

[Example Event](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/technical-guide/event-examples#appusage_history)

### audioChange <a href="#batterycycle" id="batterycycle"></a>

This event indicates the device audio volume has changed.  The data is reported within the details.message column.

Event introduced in Support Application 5.20.26.

[Example Event](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/technical-guide/event-examples#audiochange)

### batteryCycle <a href="#batterycycle" id="batterycycle"></a>

This event indicates the battery has cycled.

A battery cycle is calculated during power change. When the battery level goes up, the incremental value change is tracked. Once this incremental value equals to 100, it is considered a battery cycle.

```
Example:
1. The device battery starts at 90.
2. The device charges to 100.  That is a change of 10.  10 is added to internal storage.
3. The device battery drains to 50.
4. The device charges to 80.  That is a change of 30.  This is added to internal storage, which is now 40.
```

[Example Event](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/technical-guide/event-examples#batterycycle)

### bluetoothEvent <a href="#bluetoothevent" id="bluetoothevent"></a>

This event indicate a change in Bluetooth state or pairing status.

| Field       | Data Type | Description                                                                                                                                                              |
| ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| bluetooth   | Object    | Collection of events with information on Bluetooth state and paired devices.                                                                                             |
| details.tag | String    | Defines a category for the Bluetooth event occurring: `"bluetooth_pairing_request"`, `"bluetooth_state_change"`, `"bluetooth_connected"`, or `"bluetooth_disconnected"`. |

[Example Event](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/technical-guide/event-examples#bluetoothevent)

### bluetooth\_le <a href="#bluetooth_le" id="bluetooth_le"></a>

This event shows BLE information for connected Bluetooth Low Energy devices.

| Field           | Data Type | Description                                                 |
| --------------- | --------- | ----------------------------------------------------------- |
| details.message | String    | Contains a JSON representation of data from the BLE device. |

[Example Event](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/technical-guide/event-examples#bluetooth_le)

### boot <a href="#boot" id="boot"></a>

This event indicates the device just booted up. The event will start tracking the Settings.

| Field          | Data Type | Description                                                                                             |
| -------------- | --------- | ------------------------------------------------------------------------------------------------------- |
| deviceSettings | Object    | Collection of Settings information: `devMode`, `adbEnabled`, `usb`, `rootAccess`, `disabledlockScreen`. |
| devicedetails  | Object    | Collection of OS related information: `os`, `build`, `kernel`, `type`.                                  |
| ntpServer      | String    | IP address of a device's configured NTP server.                                                         |

[Example Event](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/technical-guide/event-examples#exception)

### cellularChange <a href="#cellularchange" id="cellularchange"></a>

This event tracks changes in information or state of the device's cellular service.

| Field             | Data Type | Description                                                                                         |
| ----------------- | --------- | --------------------------------------------------------------------------------------------------- |
| airplaneMode      | Boolean   | Indicates whether the device currently has airplane mode enabled                                    |
| cellularState     | String    | Indicates the current state of the device's cellular service (i.e., 'CONNECTED' and 'DISCONNECTED') |
| cellularNetwork   | String    | The type of the cellular network that the device is using (e.g., 'LTE')                             |
| cellularInfo      | String    | An array printed as a string that describes the cellular network                                    |
| lastCellularLevel | int       | Signal level of the cellular network                                                                |
| wifiInfo          | Object    | Collection of wifi information that includes whether or not wifi is enabled                         |
| gps               | Object    | Collection of GPS information that includes whether it's enabled and where the device is            |

[Example Event](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/technical-guide/event-information#cellularchange)

### exception <a href="#exception" id="exception"></a>

This event indicates an Exception occurred within the Optiko Agent.

| Field      | Data Type | Description                  |
| ---------- | --------- | ---------------------------- |
| stackTrace | String    | The stack trace of the error |

[Example Event](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/technical-guide/event-information#exception)

### heartbeat <a href="#heartbeat" id="heartbeat"></a>

This event is fired to let the server know that this device is still active. The event occurs every 15-30 minutes (configurable).

| Field                   | Data Type | Description                                                                                         |
| ----------------------- | --------- | --------------------------------------------------------------------------------------------------- |
| airplaneMode            | Boolean   | Indicates whether the device currently has airplane mode enabled                                    |
| cellularState           | String    | Indicates the current state of the device's cellular service (i.e., 'CONNECTED' and 'DISCONNECTED') |
| network                 | Object    | Collection of wifi information that includes whether or not wifi is enabled                         |
| [bluetooth](#bluetooth) | Object    | Collection of events with information on Bluetooth state and paired devices.                        |

[Example Event](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/technical-guide/event-examples#networksession)

### installedApplications <a href="#installedapplications" id="installedapplications"></a>

This event gives a list of installed user applications. The event is generated under these conditions:

* On initial start of application after installation.
* On device boot and *installAppsOnBoot* is true.
* Power connection change, device is discharging, and *installAppsUncradled* is true.

Starting in Support Agent version 5.20.x, system level applications will be reported within the Installed System Applications event, while user level applications will be reported within the *installedapplications* event.

| Field      | Data Type  | Description                                                                       |
| ---------- | ---------- | --------------------------------------------------------------------------------- |
| appdetails | Array List | Array of objects contain "label", "name", "type" and "ver" of packages installed. |

[Example Event](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/technical-guide/event-information#installedapplications)

### installedSystemApplications <a href="#installedapplications" id="installedapplications"></a>

This event gives a list of installed system applications. The event is generated under these conditions:

* On initial start of application after installation.
* On device boot and *installAppsOnBoot* is true and *reportSystemApps is true.*
* Power connection change, device is discharging, and *installAppsUncradled* is true and *reportSystemApps is true.*

Starting in Support Agent version 5.20.x, system level applications will be reported within the Installed System Applications event, while user level applications will be reported within the Installed Applications event.

| Field      | Data Type  | Description                                                                       |
| ---------- | ---------- | --------------------------------------------------------------------------------- |
| appdetails | Array List | Array of objects contain "label", "name", "type" and "ver" of packages installed. |

[Example Event](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/technical-guide/event-examples#installedsystemapplications)

### licenseCheck <a href="#licensecheck" id="licensecheck"></a>

This event indicates a warning or error with a device license.

### location <a href="#location" id="location"></a>

This event is triggered every time the FINDME feature is used. Pinging the device can also be from another device via the device finder application.

#### **Triggers:**

* Portal:
  * Request Location
  * Device action → Ping device
* Device Finder Application

<figure><img src="/files/WtVfVfSJMK02WZTbjDhC" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/51WSCzReVFWLfbMQbGQG" alt=""><figcaption></figcaption></figure>

#### Configuration Dependencies:

<table><thead><tr><th width="227.21484375">Field</th><th width="104.4453125">Type</th><th width="249.67578125">Description</th><th>Default</th></tr></thead><tbody><tr><td>findMeAutoEnabled</td><td>Boolean</td><td>Enable/disable FindMe feature</td><td>null</td></tr><tr><td>findMePlayMedia</td><td>Boolean</td><td>Whether to play audio alert</td><td>null</td></tr><tr><td>findMePlayInternalMedia</td><td>Boolean</td><td>Use internal audio file</td><td>null</td></tr><tr><td>findMeTimeToPlay</td><td>Int</td><td>Duration to play audio (ms)</td><td>null</td></tr><tr><td>findMeTimeToPlayShort</td><td>Int</td><td>Short duration audio play (ms)</td><td>null</td></tr><tr><td>findMeExternalMedia</td><td>String</td><td>Path to external audio file</td><td>null</td></tr><tr><td>findMeBatteryLevelWarning</td><td>Int</td><td>Battery level for warnings</td><td>null</td></tr><tr><td>findMeAlarmVolume</td><td>Int</td><td>Volume for FindMe alarm</td><td>null</td></tr><tr><td>findMeLowBatteryAlarmVolume</td><td>Int</td><td>Volume for low battery alarm</td><td>null</td></tr><tr><td>findMeLowBatteryAlarmLoopMinutes</td><td>Int</td><td>Low battery alarm repeat interval</td><td>null</td></tr><tr><td>findMeLowBatteryExternalMedia</td><td>String</td><td>External audio for low battery</td><td>null</td></tr><tr><td>findMeIgnoreScreenState</td><td>Boolean</td><td>Ignore screen on/off state</td><td>null</td></tr><tr><td>findMeMovementThresholdSeconds</td><td>Int</td><td>Motion detection threshold</td><td>null</td></tr><tr><td>findMeStopAlertOnMotion</td><td>Boolean</td><td>Stop alert if device moves</td><td>null</td></tr></tbody></table>

#### Event Details:

1. **GPS Information (GPSInformation)**

| Field           | Type    | Description                     |
| --------------- | ------- | ------------------------------- |
| gpsEnabled      | Boolean | GPS provider enabled status     |
| gpsLat          | String  | GPS latitude                    |
| gpsLong         | String  | GPS longitude                   |
| gpsAccuracy     | Float   | GPS accuracy in meters          |
| netEnabled      | Boolean | Network provider enabled status |
| netLat          | String  | Network-based latitude          |
| netLong         | String  | Network-based longitude         |
| netAccuracy     | Float   | Network accuracy in meters      |
| passiveEnabled  | Boolean | Passive provider enabled status |
| passiveLat      | String  | Passive provider latitude       |
| passiveLong     | String  | Passive provider longitude      |
| passiveAccuracy | Float   | Passive provider accuracy       |

2. **Access Points List (List\<AccessPoint>)**

Each AccessPoint contains:

<table><thead><tr><th width="207.34375">Field</th><th width="143.79296875">Type</th><th>Description</th></tr></thead><tbody><tr><td>mac</td><td>String</td><td>BSSID (MAC address) of access point</td></tr><tr><td>ssid</td><td>String</td><td>Network name (SSID)</td></tr><tr><td>strength</td><td>Int</td><td>Signal strength in dBm (RSSI)</td></tr><tr><td>bars</td><td>Int</td><td>Signal bars (0-5)</td></tr><tr><td>channel</td><td>Int</td><td>WiFi channel number</td></tr><tr><td>frequency</td><td>Int</td><td>Frequency in MHz (2.4GHz/5GHz)</td></tr><tr><td>frequencyBand</td><td>Double</td><td>Band classification</td></tr><tr><td>signalNoiseRatio</td><td>Double</td><td>Signal-to-noise ratio</td></tr><tr><td>isConnected</td><td>Boolean</td><td>Whether the device is connected to this AP</td></tr><tr><td>distance</td><td>Double</td><td>Estimated distance in meters</td></tr></tbody></table>

3. **Additional Context and details**

<table><thead><tr><th width="211.55859375">Field</th><th width="240.0859375">Source </th><th>Description</th></tr></thead><tbody><tr><td>battery</td><td>SupportEventHelper.getBattery()</td><td>Standard battery telemetry</td></tr><tr><td>network</td><td>SupportEventHelper.getWifi()</td><td>Current WiFi connection details</td></tr><tr><td>foregroundApp</td><td>SupportEventHelper.getForegroundApp()</td><td>Currently active app</td></tr><tr><td>screenState</td><td>SupportEventHelper.getScreenState()</td><td>Screen on/off status</td></tr><tr><td>userSettings</td><td>SupportEventHelper.getUserSettings()</td><td>User preference data</td></tr></tbody></table>

### lowBattery <a href="#lowbattery" id="lowbattery"></a>

This event indicates that battery is getting low. System typically invokes when battery level gets below 15%.

[Example Event](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/technical-guide/event-examples#lowbattery)

### lowMemory <a href="#lowmemory" id="lowmemory"></a>

This event indicates that memory is getting low. onLowMemory at application level.

[Example Event](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/technical-guide/event-examples#lowmemory)

### lowStorage <a href="#lowstorage" id="lowstorage"></a>

This event is generated when one of four locations are over 80% used. This usage is checked on device Boot, when an application is installed or removed, on request (via SilentInitActivity), and on a timer.

[Example Event](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/technical-guide/event-examples#lowstorage)

### missingPermissions <a href="#missingpermissions" id="missingpermissions"></a>

This event indicates that the Support Application is missing permissions. The event is introduced in version 5.14.2.

[Example Event](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/technical-guide/event-examples#missingpermissions)

| Field           | Type   | Description                               |
| --------------- | ------ | ----------------------------------------- |
| details.message | String | An array list of the missing permissions. |

### networkEvent <a href="#networkevent" id="networkevent"></a>

This event tracks information of current network connection.

[Example Event](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/technical-guide/event-examples#networkevent)

#### **Link Properties Information**

This event describes the properties of a network link. A link represents a connection to a network. It may have multiple addresses and multiple gateways, multiple dns servers but only one http proxy and one network interface.

| Field              | Data Type                    | Description                                                                     |
| ------------------ | ---------------------------- | ------------------------------------------------------------------------------- |
| dnsServer          | List\<InetAddress>           | List of IP address of DNS servers                                               |
| domains            | String                       | The DNS domains search path set for this link                                   |
| proxyHost          | String                       | The host of the proxy                                                           |
| proxyPort          | int                          | The port of the proxy                                                           |
| proxyExclusionList | String\[]                    | List of hosts for which the proxy is ignored                                    |
| interfaceName      | String                       | Interface name for this link                                                    |
| linkAddresses      | ArrayList\<LinkInformation>  | List of LinkInformation that contains: host InetAddress, host flags, host scope |
| routes             | ArrayList\<RouteInformation> | List of information of all routes set to this link                              |

#### **Network Information**

| Field         | Data Type | Description                                                                                                                                                                            |
| ------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| detailedState | String    | Reports the current fine-grained state of the network.                                                                                                                                 |
| extraInfo     | String    | Report the extra information about the network state, if any was provided by the lower networking layers.                                                                              |
| isAvailable   | Boolean   | Indicates whether network connectivity is possible.                                                                                                                                    |
| isFailover    | Boolean   | Indicates whether the current attempt to connect to the network resulted from the ConnectivityManager trying to fail over to this network following a disconnect from another network. |
| isConnected   | Boolean   | Indicates whether network connectivity exists and it is possible to establish connections and pass data.                                                                               |
| isRoaming     | Boolean   | Indicates whether the device is currently roaming on this network. When true, it suggests that use of data on this network may incur extra costs.                                      |
| networkType   | Integer   | Reports the type of network (mobile, wifi, wimax, ethernet, bluetooth)                                                                                                                 |
| state         | String    | Reports the current coarse-grained state of the network.                                                                                                                               |
| subtype       | Integer   | Return a network-type-specific integer describing the subtype of the network.                                                                                                          |
| subtypeName   | String    | Return a human-readable name describing the subtype of the network.                                                                                                                    |
| typeName      | String    | Return a human-readable name describe the type of the network, for example "WIFI" or "MOBILE".                                                                                         |
| reason        | String    | Report the reason an attempt to establish connectivity failed, if one is available.                                                                                                    |

#### **Wi-Fi Information**

| Field                   | Data Type          | Description                                                                                                                                                                                       |
| ----------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| connected               | Boolean            | Indicates whether network connectivity exists and it is possible to establish connections and pass data.                                                                                          |
| hiddenSSID              | Boolean            | `true` if this network does not broadcast its SSID, so an SSID-specific probe request must be used for scans.                                                                                     |
| bssid                   | String             | Return the basic service set identifier (BSSID) of the current access point. The BSSID may be null if there is no network currently connected.                                                    |
| wifiStandard            | String             | Returns the supported WiFi standard of the access point.                                                                                                                                          |
| ssid                    | String             | Returns the service set identifier (SSID) of the current 802.11 network.                                                                                                                          |
| channel                 | Integer            | Returns the corresponding WiFi channel of the device connection.                                                                                                                                  |
| band                    | String             | Returns the frequency band of the WiFi connection.                                                                                                                                                |
| linkSpeed               | Integer            | Returns the current link speed in Mbps.                                                                                                                                                           |
| maxSupportedTxLinkSpeed | Integer            | Returns the maximum supported transmit link speed of the access point.                                                                                                                            |
| maxSupportedRxLinkSpeed | Integer            | Returns the maximum supported receive link speed of the access point.                                                                                                                             |
| networkId               | Integer            | Each configured network has a unique small integer ID, used to identify the network when performing operations on the supplicant.                                                                 |
| isRoaming               | Boolean            | Indicates whether the device is currently roaming on this network. When true, it suggests that the device is connected to the same SSID, but moving through different access points, i.e. BSSIDs. |
| rssi                    | Integer            | Returns the received signal strength indicator of the current 802.11 network, in dBm.                                                                                                             |
| macAddress              | String             | Returns device's MAC address.                                                                                                                                                                     |
| connectType             | String             | Type of network connection. Values are `"WIFI"` and `"MOBILE"`.                                                                                                                                   |
| connectSubtype          | String             | Return a human-readable name describing the subtype of the network.                                                                                                                               |
| ipAddress               | String             | Return device's IP address.                                                                                                                                                                       |
| frequency               | Integer            | Returns the current frequency in MHz.                                                                                                                                                             |
| gateway                 | String             | Returns the gateway address.                                                                                                                                                                      |
| dns1                    | String             | Domain Name Server name.                                                                                                                                                                          |
| dns2                    | String             | Alternate Domain Name Server name.                                                                                                                                                                |
| proxy                   | String             | Defines the http proxy configuration.                                                                                                                                                             |
| savedNetworks           | ArrayList\<String> | List of SSIDs of saved networks.                                                                                                                                                                  |

[Example Event](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/technical-guide/event-examples#networkevent)

### networkStats <a href="#networksession" id="networksession"></a>

This event provides detailed per-application network usage tracking. The event tracks how much data (internet/Wi-Fi) each app on the device uses over time. It's like a detailed phone bill that shows which apps are using the most data.

The networkStats sampling works in two steps:

1. Collecting: Every hour (or configured interval), it records how much data each app used
2. Reporting: Every few hours, it bundles all that information and sends it to the server

**What Information Gets Sent:**

**Summary Information (Overall Totals)**

| Information    | What It Means                | Example                       |
| -------------- | ---------------------------- | ----------------------------- |
| Total Upload   | All data sent from device    | "15.1 MB uploaded"            |
| Total Download | All data received by device  | "229.1 MB downloaded"         |
| Time Period    | When this data was collected | "Jan 18, 10:00 AM - 2:00 PM"  |
| Time Zone      | Local time and UTC time      | Both local and UTC timestamps |
| Interval       | How often data was sampled   | "Every 2 hours"               |

**Per-App Breakdown**

For every app that used data, the report shows:

| Information       | What It Means                      | Example                 |
| ----------------- | ---------------------------------- | ----------------------- |
| App Name          | The app's display name             | "Chrome Browser"        |
| Package Name      | Technical app identifier           | "com.android.chrome"    |
| Wi-Fi Upload      | Data sent over Wi-Fi               | "512 KB"                |
| Wi-Fi Download    | Data received over Wi-Fi           | "2 MB"                  |
| Cellular Upload   | Data sent over cellular/mobile     | "0 KB"                  |
| Cellular Download | Data received over cellular/mobile | "0 KB"                  |
| Time Period       | When this app used this data       | "Jan 18, 10:00 - 11:00" |

**Special Entries You Might See**

| Entry Name   | What It Means                                   |
| ------------ | ----------------------------------------------- |
| "System"     | Built-in Android system processes               |
| "RemovedApp" | Apps that were uninstalled but had data usage   |
| "Tethering"  | Data used when device shares internet (hotspot) |

**Configuration Dependency**

networkStats is disabled by default and must be turned on via config.

**Required Settings**

To enable the feature:

| Setting Name        | What To Set    | Required?                             |
| ------------------- | -------------- | ------------------------------------- |
| networkStatsEnabled | Must be "true" | YES - Feature won't work without this |

**Optional Settings (Fine-Tuning):**

| Setting Name               | What It Controls                    | Default       | Allowed Values |
| -------------------------- | ----------------------------------- | ------------- | -------------- |
| networkStatsInterval       | How often to collect data snapshots | Every 1 hour  | 1-24 hours     |
| networkStatsUploadInterval | How often to send reports           | Every 4 hours | 1-24 hours     |

#### Configuration Examples

Example 1: Standard Monitoring networkStatsEnabled = "true" networkStatsInterval = "1" (collect every hour) networkStatsUploadInterval = "4" (report every 4 hours)

Result: Collects 4 snapshots, then sends one report with all 4

Example 2: Frequent Reporting networkStatsEnabled = "true" networkStatsInterval = "2" (collect every 2 hours) networkStatsUploadInterval = "6" (report every 6 hours)

Result: Collects 3 snapshots, then sends one report with all 3

Example 3: Conservative Monitoring networkStatsEnabled = "true" networkStatsInterval = "6" (collect every 6 hours) networkStatsUploadInterval = "24" (report once per day)

### networkSession <a href="#networksession" id="networksession"></a>

This event monitors your WiFi connection quality over time, acting like a 'report card' for each network you connect to. It tracks signal strength, monitors connection duration, and generates a summary whenever your connection changes. Specifically, this event is triggered by a change in SSID or BSSID, occurring whenever a Connection Change event is detected.

#### **Triggers:**

This report is automatically created when:

* WiFi changes - You connect/disconnect or switch networks
* Connection changes - Your internet switches between WiFi and cellular
* Power changes - You plug in or unplug your device

#### **Settings needed:**

This feature works automatically - no settings needed to turn on.

#### **Event Information:**

1. Wi-Fi Connection Summary

| Information     | Example                         |
| --------------- | ------------------------------- |
| Network Name    | "Office WiFi" or "Home Network" |
| Access Point ID | Unique ID for the WiFi router   |
| Start Time      | "Jan 18, 10:00 AM"              |
| End Time        | "Jan 18, 2:30 PM"               |
| Duration        | "4 hours 30 minutes"            |

2. Wi-Fi Signal Strength

| Measurement      | What It Tells You               |
| ---------------- | ------------------------------- |
| Weakest Signal   | Worst connection during session |
| Strongest Signal | Best connection during session  |
| Average Signal   | Typical connection quality      |

Signal strength tip: Measured in "dBm" (like bars on your phone)

* 30 dBm = Excellent
* 50 dBm = Good
* 70 dBm = Fair
* 80 dBm = Poor

3. Device Status Snapshot

   Current device information included in the report:

| Category   | What's Included              |
| ---------- | ---------------------------- |
| Battery    | Level and charging status    |
| Wi-Fi      | Current network connection   |
| Location   | GPS coordinates (if enabled) |
| Active App | App currently in use         |
| Screen     | On or off                    |
| Settings   | Device preferences           |

How it works:

| Step                                | What Happens                                       |
| ----------------------------------- | -------------------------------------------------- |
| <ol><li>Tracking</li></ol>          | Device measures WiFi signal while you're connected |
| <ol start="2"><li>Trigger</li></ol> | Network, connection, or power state changes        |
| <ol start="3"><li>Summary</li></ol> | Creates report with signal statistics              |
| <ol start="4"><li>Cleanup</li></ol> | Deletes old measurements to save space             |

Example scenario:

Morning at the office:

| Time     | Event                                | Signal Strength  |
| -------- | ------------------------------------ | ---------------- |
| 9:00 AM  | Connect to "Office WiFi" near router | -40 dBm (Strong) |
| 11:00 AM | Move to meeting room                 | -70 dBm (Weak)   |
| 12:00 PM | Plug in device to charge             | Report Created   |

Report shows:

* Network: "Office WiFi"
* Duration: 3 hours (9 AM - 12 PM)
* Best signal: -40 dBm
* Worst signal: -70 dBm
* Average signal: -55 dBm

| Field     | Data Type | Description                             |
| --------- | --------- | --------------------------------------- |
| startTime | Date/Time | Start Date/time of the connection       |
| endTime   | Date/Time | Date/Time when connection lost          |
| duration  | long      | Duration, in seconds, of the connection |
| minRssi   | long      | Minimum Rssi value duration connection  |
| maxRssi   | long      | Maximum Rssi value duration connection  |
| avgRssi   | double    | Average Rssi value duration connection  |
| ssid      | String    | SSID of the Connection                  |
| bssid     | String    | BSSID of the Connection                 |

[Example Event](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/technical-guide/event-examples#networksession)

***

### packageAdd <a href="#packageadd" id="packageadd"></a>

This event indicates the package / application has been added to the system.

| Field     | Data Type | Description                                  |
| --------- | --------- | -------------------------------------------- |
| appdetail |           | contains package Label, Name and the Version |

[Example Event](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/technical-guide/event-examples#packageadd)

### packageRemove <a href="#packageremove" id="packageremove"></a>

This event indicates the package / application has been removed from the system.

| Field     | Data Type | Description                       |
| --------- | --------- | --------------------------------- |
| appdetail |           | Contains the name of the Package. |

[Example Event](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/technical-guide/event-examples#packageremove)

### powerSession <a href="#powersession" id="powersession"></a>

This event indicates Charging / Discharging. When a device stops charging (i.e., is removed from Cradle), this event will be generated to indicate the duration of the Charge, the beginning/ ending Charge levels, and the Rate of Charge per hour. Once the device begins charging (i.e., is placed on Cradle), an event will be generated to indicate the Discharge of the battery (duration, beginning/ending charge, rate per hour of discharge).

Use "type" field to determine whether it is a "charge" or "discharge" event session.

| Field         | Data Type | Description                                                 |
| ------------- | --------- | ----------------------------------------------------------- |
| type          | String    | indicates either a CHARGE or DISCHARGE session              |
| startTime     | Date/Time | Start Date/Time of session                                  |
| endTime       | Date/Time | Ending Date/Time of session                                 |
| duration      | long      | Length, in seconds, of the session                          |
| startCharge   | long      | Charge value at the beginning of session                    |
| endCharge     | long      | Charge value at the end of session                          |
| ratePerHour   | double    | Rate per hour of the charge or discharge                    |
| projectedHour | long      | Projected number of hours to discharge or charge the device |

[Example Event](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/technical-guide/event-examples#powersession)

### roamingEvent

These are events generated when a connected device moves from one access point (BSSID) to another access point (BSSID). A change in a connected access point is commonly due to low RSSI level and is handled by a Wi-Fi network controller.

### settingsChanged <a href="#settingschange" id="settingschange"></a>

If any of the Android Settings (USB, Root Access, etc) change from the BOOT of the device, then this event will be sent out.

[Example Event](https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/technical-guide/event-examples#settingschanged)

### shutdown <a href="#shutdown" id="shutdown"></a>

This event indicates a device has shut down normally.

### storage

This event contains information about the device storage levels.  The event can be generated upon request from Portal.  The event is generated on Device boot and after every 20th Heartbeat event.

### support <a href="#support" id="support"></a>

This event indicates information concerning logs, storage information, device settings, and device information.

## Data Points <a href="#data-points" id="data-points"></a>

Each of the events has the following common data points.

#### Common <a href="#common" id="common"></a>

| Field        | Data Type                                     | Description                                                                   |
| ------------ | --------------------------------------------- | ----------------------------------------------------------------------------- |
| time         | Date                                          | The date/time the event was generated.                                        |
| orgId        | String                                        | The organization ID to which the device belongs.                              |
| origin       | String                                        | Indicates "handheld".                                                         |
| originIP     | String                                        | The IP address of the network within which the event originated.              |
| originModel  | String                                        | Device model identifier (e.g. TC21, CT60, etc.).                              |
| version      | Integer                                       | Support Agent application version number.                                     |
| event        | String                                        | The event name.                                                               |
| deviceId     | String                                        | The device serial number.                                                     |
| userSettings | Map\<String, String>, converted to JSON Array | Key/value pairs of user application settings. i.e. StoreNumber, User Id, etc. |

#### Device Activity Details <a href="#device-activity-details" id="device-activity-details"></a>

Some events contain additional device details. These details include the following points: Battery, Network, GPS (location), ScreenState, Foreground APP, and Additional Details (optional).

| Field               | Data Type  | Description                                                                                                                                                                                         |
| ------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| foregroundApp       | String     | Package / Application that is currently in the foreground when event generated                                                                                                                      |
| screenState         | String     | Screen ON or OFF                                                                                                                                                                                    |
| details             | Hash Map   | Key / value pairs of different data points. Most likely from other applications.                                                                                                                    |
| permissionsAppUsage | Boolean    | 1 or 0 to indicate if the Optiko Agent as permissions to use AppUsage data. If the field does not exist, then device does not support application usage permissions.                                |
| activeAdmins        | Array List | List of package names that are currently set as Device Administrator applications. Package name strings separated with a comma (e.g. `[“com.airwatch.admin.motorolamx”,“com.google.android.gms”]`). |
| accessPoints        | Array List | List of the network access points nearest to a device; the results of a WiFi scan via the Support Agent application.                                                                                |
| airplaneMode        | Boolean    | Indicates whether the device currently has airplane mode enabled                                                                                                                                    |
| cellularState       | String     | Indicates the current state of the device's cellular service (i.e., 'CONNECTED' and 'DISCONNECTED')                                                                                                 |
| battery             | Object     | Battery information. See [Battery](#battery) for details.                                                                                                                                           |
| gps                 | Object     | GPS information. See [GPS](#gps) for details                                                                                                                                                        |
| network             | Object     | Network information. See [Network](#network) for details                                                                                                                                            |

#### Battery <a href="#battery" id="battery"></a>

| Field           | Data Type | Description                                                                                              |
| --------------- | --------- | -------------------------------------------------------------------------------------------------------- |
| technology      | String    | battery tech, ex: Li-ion                                                                                 |
| connectionState | String    | If charging, how is the battery connected: USB, Wireless, etc                                            |
| health          | String    | The health of the battery, as detected by the OS. Good, Bad, etc.                                        |
| serialNumber    | String    | The Battery serial Number                                                                                |
| status          | String    | Battery status, charging or discharging                                                                  |
| voltage         | int       | Battery voltage                                                                                          |
| temperature     | double    | Current battery temperature                                                                              |
| charge          | double    | Current charge on battery                                                                                |
| maxCapacity     | double    | Maximum charging capacity of device's battery, which registers as fully-charged (e.g.`100`, `97`, etc.). |

#### Battery Detail <a href="#batterydetail" id="batterydetail"></a>

| Field                 | Data Type | Description                                                                                                                                                              |
| --------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| manufactureDate       | Date      | Battery manufacture date.                                                                                                                                                |
| partNumber            | String    | Part number for battery. Prefix is "21-” or “82-” (e.g. `"21-xxxxx-01 Rev. X"`).                                                                                         |
| backupBatteryVoltage  | String    | Backup battery voltage.                                                                                                                                                  |
| ratedCapacity         | String    | Rated capacity of the battery.                                                                                                                                           |
| decommissionStatus    | String    | Decommission status of the battery.                                                                                                                                      |
| baseCumulativeCharge  | String    | Cumulative charge using Zebra charging equipment only.                                                                                                                   |
| noOfChargeCycle       | String    | Number of charge cycles.                                                                                                                                                 |
| totalCumulativeCharge | String    | Cumulative charge using any (Zebra or non-Zebra) charging equipment.                                                                                                     |
| secondsSinceFirstUse  | String    | Number of seconds passed since the battery was placed in a charger/terminal for the first time.                                                                          |
| presentCapacity       | String    | Maximum amount of charge that could be pulled from the battery under the present discharge conditions if the battery is fully charged.                                   |
| healthPercentage      | String    | Battery health indicator in percentage (0 to 100).                                                                                                                       |
| timeToEmpty           | String    | Remaining time until the device becomes unusable under current discharge conditions. If the returned value is `"65535"`, then `timeToEmpty` is considered to be unknown. |
| timeToFull            | String    | Time until battery is fully charged under present charging conditions. If the returned value is `"65535"`, then `timeToFull` is considered to be unknown.                |

#### Bluetooth <a href="#bluetooth" id="bluetooth"></a>

| Field  | Data Type  | Description                                                                                                                            |
| ------ | ---------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| state  | String     | Bluetooth enabled status; `"on"` or `"off"`.                                                                                           |
| device | Array List | Objects consisting of string values for paired devices' `deviceName`, `connectionStatus`, `macAddress`, `category`, and `subCategory`. |

#### GPS <a href="#gps" id="gps"></a>

GPS Location Information

| Field          | Data Type | Description                                                                                                                                                                                                                                                |
| -------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| gpsEnabled     | boolean   | For device models that have GPS radios, `true` means that the Support Agent is able to get device location coordinates via satellite.                                                                                                                      |
| netEnabled     | boolean   | `true` means that the Support Agent is able to get device location coordinates from the network provider based on availability of cell tower and/or WiFi access points.                                                                                    |
| passiveEnabled | boolean   | `true` means that the Support Agent is able to get device location coordinates via other applications' requests. Support Agent does not call for location updates itself, but  instead uses location results generated when other applications request it. |
| gpsLat         | String    | Latitude according to satellite when `"gpsEnabled": true`.                                                                                                                                                                                                 |
| gpsLong        | String    | Longitude according to satellite when `"gpsEnabled": true`.                                                                                                                                                                                                |
| netLat         | String    | Latitude according to network provider when `"netEnabled": true`.                                                                                                                                                                                          |
| netLong        | String    | Longitude according to network provider when `"netEnabled": true`.                                                                                                                                                                                         |
| passiveLat     | String    | Latitude according to other applications when `"passiveEnabled": true`.                                                                                                                                                                                    |
| passiveLong    | String    | Longitude according to other applications when `"passiveEnabled": true`.                                                                                                                                                                                   |

#### Network <a href="#network" id="network"></a>

| Field             | Data Type | Description                                                     |
| ----------------- | --------- | --------------------------------------------------------------- |
| connectionSubType | String    | battery tech, ex: Li-ion                                        |
| connectType       | String    | Type of network connection. Values are `"WIFI"` and `"MOBILE"`. |
| connected         | boolean   | connected (1) or not connected (0)                              |
| ssid              | String    | Current SSID                                                    |
| ipAddress         | String    | AP Ip Address                                                   |
| linkSpeed         | int       | Link Speed                                                      |
| networkId         | Int       | Network ID                                                      |
| isRoaming         | boolean   | Is the device roaming.                                          |
| rssi              | int       | RSSI value, indicates Signal Strength                           |
| hiddenSSID        | boolean   | Is the SSID Hidden                                              |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bluefletch.com/bluefletch-enterprise/product-guides/support-application/technical-guide/event-information.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
