# Mobile Sensing
movisensXS has the ability to do mobile sensing. Mobile sensing is "Using the sensors of a mobile device (i.e. smartphone or tablet computer) to acquire data from the environment." (opens new window) Modern Smartphones are equipped with the sensors to monitor a diverse range of human activities and commonly encountered contexts.
This is particularly useful for the research field of ambulatory assessment.
Mobile sensing data is store in the Unisens format. Read more about the file format here.
WARNING
The mobile sensing features are only available on request!
# Features Library version 8455
Log Heart Rate On request
This logs the heart rate of a BLE sensor in range.
Log Gamification Score On request
Adds Gamification capabilities to movisensXS.
Label | Description | Type | Default-Value |
---|---|---|---|
Added Score for Form completed On request | Count which should be added to gamification score when a form will be completed. | Integer | 5 |
Subtracted Score for Form incomplete On request | Count which should be subtracted from gamification score when a form will be incomplete. | Integer | 1 |
Subtracted Score for Alarm dismissed On request | Count which should be subtracted from gamification score when a alarm will be dismissed. | Integer | 2 |
Subtracted Score for Alarm missed On request | Count which should be subtracted from gamification score when a alarm will be missed. | Integer | 1 |
Active Streaks as JSON On request | Describes which streaks are active, which names they have, which multiplier they give and how many forms should be completed. | String | |
Active Level as JSON On request | Count which should be subtracted from gamification score when a alarm will be missed. | String | |
Gamification Notifications On request | Enables notifications for gamification events. | Boolean | true |
Log App Usage On request
This logs the used applications.
Label | Description | Type | Default-Value |
---|---|---|---|
Limit to Apps On request | Applications which should be logged only. All other applications will not be written in log files. Please split with ';' if you want to specify more than one. | String |
Log Audio Volume & Frequency On request
This logs the volumen and frequency of the microfone.
Log Battery Level On request
This logs the battery level to a unisens log.
Log Nearby Devices On request
This logs nearby devices in an unsisens log file. It will send a bluetooth advertisement through IBeacon standard on supported devices and will protocol all other devices which are broadcasting with a beacon standard.
Label | Description | Type | Default-Value |
---|---|---|---|
Broadcast Signal On request | Enable to broadcast nearby signal. | Boolean | true |
Scanning interval On request | Determines how long the scan should last. Beacon scanning consumes power, a practical value is 10 seconds. | Integer | 10 |
Time Between Scans On request | Interval between scans in seconds. Beacon scanning consumes power, a practical value is 300 seconds. | Integer | 300 |
Log Nearby Device Count On request
This logs the nearby devices count in an unsisens log file. It will send a bluetooth advertisement through IBeacon standard on supported devices and will protocol all other devices which are broadcasting with a beacon standard.
Label | Description | Type | Default-Value |
---|---|---|---|
Broadcast Signal On request | Enable to broadcast nearby signal. | Boolean | true |
Scanning interval On request | Determines how long the scan should last. Beacon scanning consumes power, a practical value is 10 seconds. | Integer | 10 |
Time Between Scans On request | Interval between scans in seconds. Beacon scanning consumes power, a practical value is 300 seconds. | Integer | 300 |
ID1/URL Regex On request | Regex of ID1 or URL in case of Eddystone URL | String | |
Types On request | Type of beacon which should be considered. Many of \ibeacon\, \eddystone\, \altbeacon\, \gaen\ | String | ibeacon, eddystone, altbeacon, gaen |
Log CPU and Memory On request
This action logs the CPU and Memory usage.
Log Device Running On request
This logs device running to a unisens log once per minute.
Log Download On request
This action downloads a file.
Label | Description | Type | Default-Value |
---|---|---|---|
URL On request | URL of the file to download | String | http://www.google.com |
Log IBeacons in range On request
This logger logs all IBeacons in range.
Label | Description | Type | Default-Value |
---|---|---|---|
Check interval On request | Interval to check if a IBeacon is around in seconds. IBeacon scanning consumes power, a practical value is 10 seconds. Use 0 for continuous scanning. | Integer | 10 |
Log Ambient Light On request
This action logs the ambient light detected by the smartphone sensor.
Log Location On request
This logs the location in an energy efficient way.
It uses GPS, WLAN and Cell to balance the battery usage with precision.
GPS | WLAN | CELL | |
---|---|---|---|
Accuracy* | ca. 10 m | ca. 40 m | 200 - 3000 m |
Availability in everyday life | 80% | In cities > 70% | > 90% |
Time until first determination | 65s | 3s | 2s |
Requirement | Clear view to the sky | WLAN nearby, Internet | Mobile cell tower nearby, Internet |
Battery Usage | High | Medium | Low |
While tracking there are continuous location updates at a maximum rate of every 5s and every 20m. The tracking transitions to a stationary state when the participant remains within 100m of a central position or no location update occurs for 120s. Then more tracking will be done until the participant leaves the 100m radius.
*Location accuracy is the estimated horizontal accuracy of this location, radial, in meters. We define horizontal accuracy as the radius of 68% confidence. In other words, if you draw a circle centered at this location's latitude and longitude, and with a radius equal to the accuracy, then there is a 68% probability that the true location is inside the circle. Furthermore problems can occur with the location tracking using WLAN if the router is moving. This can happen with WLAN in trains for example.
Log Location (GPS) On request
This logs the location measured by the GPS sensor.
Label | Description | Type | Default-Value |
---|---|---|---|
Check interval On request | Interval to check if the location has changed in seconds. Because locating consumes lots of power a practical value is 15 Minutes. | Integer | 900 |
Distance On request | Distance the device must travel to trigger a location change. Distance in meters. Accuracy varies between 10 and 1000 meters. 0 means every location update is logged. | Integer | 50 |
Log Music Listening On request
This logs the currently listened music metadata and the current playback state.
- Tested and working: Google Android Player, Amazon, Spotify (needs to be enabled inside of Spotify)
- Not tested but should work: Google Android player, HTC Music, Apollo, Miui, Real, Sonyericsson, Rdio, Samsung Music Player, PowerAmp, Last.fm, Rhapsody, PlayerPro Music Player, Rocket Player, doubleTwist Music Player, Pandora, Winamp, 8tracks playlist radio, jetAudio HD Music Player, Spotify, Soundcloud
- Tested and not working: Apple Music
Log Mutable Values On request
This logs the creation and manipulation of mutable values.
Log Static Locations On request
This logs static locations which were detected by the location functionality of movisensXS. It will only save new static location. They can be labeled via the 'Label Static Location' item.
Label | Description | Type | Default-Value |
---|---|---|---|
Location Radius On request | Location radius | Integer | 100 |
High Accuracy Timeout On request | Handles after how many seconds without location update the transition to stationary state should happen. | Integer | 120 |
Tags On request | Potential tags which can be used in 'Label Static Location' item. (Separated by ';') | String |
Log Notifications On request
This Logs all incoming notifications in an eventbased manner.
Label | Description | Type | Default-Value |
---|---|---|---|
Filter On request | Only react to the given packages (Separated with ';') | String |
Log NTP Offset On request
This logs the offset between smartphone time and ntp time which is provided by a ntp server.
Label | Description | Type | Default-Value |
---|---|---|---|
Log Interval (in s) On request | Log interval | Integer | 60 |
NTP Update Interval (in s) On request | Update interval of NTP. Set's the frequency how often the ntp should be asked for the actual time. | Integer | 60 |
Log Phone Call On request
This logs the phone activity in an anonymized way (Hashing of phone numbers).
By hashing the phone number, first an individual code will be generated. This code together with the phone number will be processed using the SHA1 hash algorithm. Because of that the hash number can not be assigned to the phone number later on. Furthermore it is not possible to compare the hashs of different participants. How a phone call can be displayed in the results is shown in this example:
442637,Call,type=Outgoing|number={"ONE_WAY_HASH":"1c3d3074811843e1e133a3cba16d506ecb7e8593"}|duration=121|time=13:44:53|date=2018-02-01
Log Physical Activity On request
This logs the physical activity of the user (IN_VEHICLE: 0, ON_BICYCLE: 1, ON_FOOT: 2, STILL: 3, UNKNOWN: 4, TILTING: 5). This implementation is based on Google Play Services which detection algorithm could change even during a running study.
Activity confidence is a value from 0 to 100 indicating the likelihood that the user is performing this activity. The larger the value, the more consistent the data used to perform the classification is with the detected activity. This value will be ≤100. It means that larger values indicate that it's likely that the detected activity is correct, while a value of ≤50 indicates that there may be another activity that is just as or more likely. Multiple activities may have high confidence values. For example, the ON_FOOT may have a confidence of 100 while the RUNNING activity may have a confidence of 1. The sum of the confidences of all detected activities for a classification does not have to be ≤100 since some activities are not mutually exclusive (for example, you can be walking while in a bus) and some activities are hierarchical (ON_FOOT is a generalization of WALKING and RUNNING).
WARNING
Beginning with Android 5, activities may be received less frequently than minutely if the device is in power save mode and the screen is off. To conserve battery, activity reporting may stop when the device is 'STILL' for an extended period of time. It will resume once the device moves again. This only happens on devices that support the Sensor.TYPE_SIGNIFICANT_MOTION hardware.
WARNING
Physical Activity cannot be measured accurately with a Smartphone. Smartphone accelerometers are not very accurate, differ between devices and the wearing position of the Smartphone varies. To accurately measure it please use a dedicated activity sensor like the movisens Move4.
Label | Description | Type | Default-Value |
---|---|---|---|
Log interval On request | Minimal interval to log the physical activity in seconds. Activity may be logged more often, if requested by other apps. | Integer | 60 |
Log Record Audio Condition On request
This condition records the audio of the microphone till the condition is set to false. Files are stored on the sdcard in the folder 'Android/data'. Please Note: If you use this, you shouldn't use other item formats which connect to the microphone.
Label | Description | Type | Default-Value |
---|---|---|---|
Maximum Duration On request | Maximum Time before finishing the recording if not stopped before in seconds | Integer | 45 |
Uncompressed On request | The files are saved as uncompressed .wav files | Boolean | false |
Password On request | The password which is used to encrypt the .wav files | String |
Log SMS On request
This logs the SMS activity in an anonymized way (Hashing of phone numbers).
Log Steps On request
This logs the steps.
WARNING
Steps cannot be measured accurately with a Smartphone. This is just an estimation based on 5 seconds of measurement of the Smartphone accelerometer in a minute. Smartphone accelerometers are not very accurate, differ between devices and the wearing position of the Smartphone varies. To accurately measure it please use a dedicated activity sensor like the movisens Move4.
Log Traffic On request
This action logs the traffic usage.
The network traffic is measured at the network layer, so they include both TCP and UDP usage. Values increase monotonically since device boot. The bytes received (RX) and transmitted (TX) are stored in the following categories:
- Total: Number of bytes transmitted since device boot.
- App: Number of bytes transmitted by the movisensXS app since device boot.
- Mobile: Number of bytes transmitted across mobile networks since device boot.
This block can be used in movisensXS after e.g. an Repeated Trigger of 3600 seconds to log this value hourly. We recommend to subtract the app usage from the total and use this value as an indicator for how active a participant has used the internet.
Log Display On/Off On request
This condition is true if the display is on.
Log Sensor Connection State On request
Logs connection states of coupled movisens sensors.
# Unisens files created by mobile sensing
Feature | Unisens file | Unisens Type (Sampling Rate) | Example | Aggregation possibility to 1 Minute (This requires to also take DeviceRunning into consideration, if available) | General Aggregation Possibilities |
---|---|---|---|---|---|
Log App Usage | AppUsage.csv | Event (New Event on Value Change) | 163250,App,com.android/android.intent.action.SCREEN_ON 163250,App,com.movisens.xs.android.core/.activities.HomeScreenActivity 163252,App,com.movisens.xs.android.core/org.odk.collect.android.activities.FormEntryActivity 163255,App,com.android.launcher3/.CustomizationPanelLauncher 163261,App,com.whatsapp/.Conversation 163265,App,com.whatsapp/.HomeActivity 163266,App,com.android.launcher3/.CustomizationPanelLauncher 163269,App,com.android/android.intent.action.SCREEN_OFF | Most used app during that minute | Minutes per day the participant used an app How often an app was used |
Log Battery Level | BatteryLevel.csv | Event (New Event on Value Change, sometimes more often) | 2417,91 2518,90 | Last Battery level | |
Log Nearby Devices | Beacon.csv | Event (New Event on Value Change) | 99242,Beacon enters,uuid=50765cb7-d9ea-4e21-99a4-fa879613a492 major=35863 minor=39920 99310,Beacon exits,uuid=50765cb7-d9ea-4e21-99a4-fa879613a492 major=35863 minor=39920 99435,Beacon enters,uuid=09142332-4556-0f78-899e-ebbcce94eff1 major=58755 minor=32856 99435,Beacon enters,uuid=74278bda-b644-4520-8f0c-720eaf059935 major=0 minor=55409 99449,Beacon exits,uuid=74278bda-b644-4520-8f0c-720eaf059935 major=0 minor=55409 99519,Beacon exits,uuid=09142332-4556-0f78-899e-ebbcce94eff1 major=58755 minor=32856 | List of active Beacons during that minute | Duration how long beacons (e.g. other participants) have been seen per day. |
Log Device Running | DeviceRunning.csv | Event (New Event on Value Change, Since app version 1.5.0 it is recorded minutely) | 10,1 70,1 130,0 (may be missing) 560,1 | Was the device on or off | |
Log Location | Location.csv | Event (New Event on Value Change, more often if movement < 200m) | 1843,49.452532,8.4103249,184.0,12.0 1848,49.4521852,8.4103595,181.0,15.0 1853,49.4518883,8.4103624,180.0,16.0 1864,49.0012464,8.4104377,190.0,26.0 1873,49.4505464,8.4105164,185.0,11.0 | Speed, Distance Traveled, Last known position | |
Log Music Listening | MusicLog.csv | Event (New Event on Value Change) | 38,Music,state=true|artist=KUMMER|album=KIOX|track=Schiff 40,Music,state=false 41,Music,state=true|artist=KUMMER|album=KIOX|track=Schiff 42,Music,state=true|artist=KUMMER|album=KIOX|track=Okay 43,Music,state=true|artist=KUMMER|album=KIOX|track=Ganz genau jetzt 44,Music,state=false | Mustic track that was listened to most of the time during that minute (==> Duration of Music listened) | |
Log Notifications | NotificationLog.csv | Event (When new Notification arrives) | 69905,Notification,Pkg=com.whatsapp|contentLenght=30 69907,Notification,Pkg=com.whatsapp|contentLenght=23 69907,Notification,Pkg=com.whatsapp|contentLenght=23 69909,Notification,Pkg=com.whatsapp|contentLenght=21 73830,Notification,Pkg=com.google.android.music|contentLenght=0 74897,Notification,Pkg=com.whatsapp|contentLenght=30 | Amount of messages during this minute or last message | Notifications per app |
Log Phone Call | PhoneCallActivity.csv | Event (When Phone call is completed) | 442637,Call,type=Outgoing|number={"ONE_WAY_HASH":"1c3d3074811843e1e133a3cba16d506ecb7e8593"}|duration=121|time=13:44:53|date=2018-02-01 | If a phone call was running during this minute | |
Log Physical Activity | ActivityLog.csv | Event (Should be minutely, on some devices less (depending on the Smartphone manufacturer and Android-Version (especially since Android 5) | 1682,2,100 1766,0,50 1827,0,62 1914,3,75 1969,3,77 2064,3,51 | Last entry that was active during this minute | |
Log SMS | SMSActivity.csv | Event (When new SMS arrives) | Messages received during this minute or last Message | Notifications per person | |
Log Steps | Steps.csv | Event (Should be minutely, on some devices less) | 0,0 60,6 | Amount of Steps in this minute | |
Log Traffic | TrafficRx.csv, TrafficTx.csv | Event (Depending on the trigger intervall configured in the sampling) | Bytes since last Event (Unrolling Diff) | ||
Log Display On/Off | DisplayOn.csv | Event (When display is turned on/off) | 0,1 631,0 | Last known state |