|
| 1 | +--- |
| 2 | +title: Sensor |
| 3 | +--- |
| 4 | + |
| 5 | +## Connectivity |
| 6 | + |
| 7 | +### Bluetooth |
| 8 | +List of discovered Bluetooth normal or low energy devices around the smartphone containing the following information: |
| 9 | + |
| 10 | +- *name*: user-friendly name of the remote device |
| 11 | +- *address*: hardware MAC Address of the device |
| 12 | +- *bondstate*: whether the remote device is connected |
| 13 | +- *rssi*: Received Signal Strength Indicator |
| 14 | +- *class code* and *class tag*: Bluetooth class of the device (e.g., phone or computer), and the class describes the characteristics and capabilities of the device (e.g., audio and telephony) |
| 15 | + |
| 16 | +### Cellular Network |
| 17 | +Information of the cellular network to which the phone is connected to: |
| 18 | + |
| 19 | +- *cellid*: identifier of the cell |
| 20 | +- *dbm*: signal strength |
| 21 | +- *type*: type of the cell, possible values are lte, wcdma, gsm and cdma |
| 22 | + |
| 23 | +### WiFi Event |
| 24 | +Returns information related to the WIFI network to which the phone is connected; if connected, it also reports the WIFI network ID. Additional features are: |
| 25 | + |
| 26 | +- *ssid*: (Service Set Identifier) ID or unique identifier of a digital network (Wi-Fi or WLAN) |
| 27 | +- *bssid*: (Basic Service Set Identifier): sequence of characters that define a wireless computer network configured to communicate directly with each other |
| 28 | +- *isconnected*: return whether the phone is connected to the WIFI |
| 29 | + |
| 30 | +### WiFi Networks Event |
| 31 | +Returns all WIFI networks detected by the smartphone. Additional features are: |
| 32 | + |
| 33 | +- *address*: unique identifier assigned to a network interface controller for use as a network address in communications within a network segment |
| 34 | +- *capabilities*: list of capabilities supported by the network, e.g., WPA and WPS |
| 35 | +- *frequency*: the WiFi frequency bands include 2.4 GHz and 5 GHz |
| 36 | +- *name*: the name assigned to the WiFi network |
| 37 | +- *rssi*: Received Signal Strength Indicator is an estimated measure of signal strength that indicates how effectively a device can receive signals from any wireless access point or Wi-Fi router. It provides insight into the quality and reliability of the connection, often measured in decibels (dBm) to represent signal strength. The RSSI value range is between 0 and -100, where 0 signifies stronger and more stable connections. |
| 38 | + |
| 39 | +## Motion |
| 40 | + |
| 41 | +### Accelerometer |
| 42 | +Measures the acceleration to which the phone is subjected and captures it as a 3D vector. The unit is $m/s^2$. |
| 43 | + |
| 44 | +### Gyroscope |
| 45 | +Measures the rotational forces to which the phone is subjected and it captures it as a 3D vector. The unit is $rad/s$. |
| 46 | + |
| 47 | +### Activities |
| 48 | +It reports the user's activity recognized by the Google Activity Recognition API. The recognized activities are *in vehicle*, *on bicycle*, *on foot*, *running*, *still*, *tilting*, *walking* and *unknown*. The sensor reports a confidence score between 0 and 100, which represents the likelihood that the user is performing the activity. |
| 49 | + |
| 50 | +### Step Counter |
| 51 | +It counts the total number of steps performed by the user (while carrying the phone) since the phone was powered on. |
| 52 | + |
| 53 | +### Step Detector |
| 54 | +An event is triggered each time the user takes a step. |
| 55 | + |
| 56 | +## Position |
| 57 | + |
| 58 | +### Location |
| 59 | +It provides the geographic coordinates of the phone: |
| 60 | + |
| 61 | +- *latitude*: latitude in degrees |
| 62 | +- *longitude*: longitude in degrees |
| 63 | +- *altitude*: the altitude in meters |
| 64 | +- *accuracy*: estimated horizontal accuracy radius in meters |
| 65 | +- *speed*: current speed of the phone in $m/s$ |
| 66 | +- *provider*: the source of the coordinates, i.e., GPS (hardware sensor in the devices), network (based on the WiFi network the phone is connected to) and passive (retrieve the location from other applications that already requested it) |
| 67 | +- *bearing*: horizontal direction of travel and it's the angle with respect to the north that is being faced |
| 68 | + |
| 69 | +### Magnetic field |
| 70 | +Reports the ambient magnetic field along the three sensor axes at the phone location. |
| 71 | + |
| 72 | +### Proximity |
| 73 | +Measures the distance between the user's head and the phone. Depending on the phone, it may be measured in centimeters (i.e., the absolute distance) or as labels (e.g., 'near', 'far'). |
| 74 | + |
| 75 | +### App Usage |
| 76 | + |
| 77 | +### Headset status |
| 78 | +Indicates whether the headphones are connected to the phone. |
| 79 | + |
| 80 | +### Music Playback |
| 81 | +Returns whether music is being played on the phone using the default music player from the operating system. Track information is not collected. |
| 82 | + |
| 83 | +### Notifications |
| 84 | +It generates an event every time the phone receives a notification and when it is dismissed by the user: |
| 85 | + |
| 86 | +- *identifier*: the unique identifier of notification within the application that generated it |
| 87 | +- *isclearable*: whether the notification can be canceled when the user clears the notifications |
| 88 | +- *isongoing*: the notification refers to an event that is ongoing, e.g., a phone call |
| 89 | +- *package*: package name of the application |
| 90 | +- *status*: whether the notification is posted or dismissed |
| 91 | + |
| 92 | +### Applications |
| 93 | +Reports the name of the application (or application package) currently running in the foreground of the phone. |
| 94 | + |
| 95 | +## Device Usage |
| 96 | + |
| 97 | +### Airplane Mode |
| 98 | +Returns whether the phone's airplane mode is on or off. When off, all the connectivity features of the phone are turned off. Airplane mode also conserves battery life by reducing power-consuming background activities. It's accessible through the quick settings menu on most devices. |
| 99 | + |
| 100 | +### Battery Charge |
| 101 | +Returns whether the phone is on charge: |
| 102 | + |
| 103 | +- *source*: type of power source connected to the device; possible values are USB, AC charge, wireless power source or unknown |
| 104 | +- *status*: whether the device is being charged |
| 105 | + |
| 106 | +### Battery Monitoring Log |
| 107 | +Returns the phone's battery level: |
| 108 | + |
| 109 | +- *level*: current battery level between 0 and 100 |
| 110 | +- *scale*: maximum level of the battery represented as a value between 0 and 100 |
| 111 | + |
| 112 | +### Doze Mode |
| 113 | +Returns whether the phone's doze mode is on or off. Doze mode is a low-power state that a phone enters after a period of inactivity to conserve battery. In this mode, background processes and network access are restricted, allowing only essential tasks, such as high-priority notifications or alarms, to function periodically. This helps significantly reduce battery consumption while the device is idle. |
| 114 | + |
| 115 | +### Ring Mode |
| 116 | +Reports the current ring status of the phone. When set to *normal*, the smartphone rings on incoming calls, messages and notifications by producing audible alerts. Other statuses are *vibrate* (where the phone vibrates instead of ringing) or *silent* (where all sounds are muted). Ring mode is often managed through the device's sound settings. |
| 117 | + |
| 118 | +### Touch event |
| 119 | +It generates an event each time the user touches the screen. |
| 120 | + |
| 121 | +### Screen status |
| 122 | +Returns whether the phone's screen is on or off. |
| 123 | + |
| 124 | +### User Presence |
| 125 | +Detects when the user is present near the phone, for example, when the user unlocks the screen. |
| 126 | + |
| 127 | +## Environment |
| 128 | + |
| 129 | +### Light |
| 130 | +This component detects ambient light level around the phone, and it is measured in illuminance (lux). This sensor helps the device adjust the screen brightness automatically, optimizing visibility while conserving battery life. For example, in bright conditions, the screen brightness increases for better readability, whereas in darker environments, it dims to reduce eye strain and save power. Light sensors are commonly located near the top of the device, often beside the front-facing camera. |
| 131 | + |
| 132 | +### Pressure |
| 133 | +It measures the ambient air pressure to which the phone is subjected in hPa or mbar. |
0 commit comments