Usage Logger walkthrough

Contents:

  1. Customisation
  2. App
  3. Decryption
  4. Analysis

Introduction

Usage logger is an Android app that records or extracts data about how a person uses their smartphone. Primarily developed to assist with psychological research and behavioural science more generally, the app can be customised to perform a number of different functions. This includes an ability to extract historical data about previous (retrospective) usage form the previous 5 days. Pre-Print:

Geyer, K., Ellis, D. A., Shaw, H. and Davidson, B. I. (2020). Open source smartphone apps and tools for measuring, quantifying, and visualizing screen time. PsyArXiv, Link here

Download a working version from the Google play store

A Terms of Service and Privacy Policy is available here

Sample data and supplementary R-code for analysis are available here. Note: the password to decrypt raw unprocessed data is L8l%Y%!b-4hW</p>

Decrypt data here

See how the app works in our YouTube video

Customise how the app works here

Customisation

The customisation website allows for the researcher to choose how the app will function. There are three different data streams that may be employed and altered. Additionally, the researcher can customise the order that the data sources are queried.

The website can be found here

These instructions are repeated on the website, you can press "show instructions" to see them on the page

Customise data collection: Specify the type of data should collect

Contextual data

Contextual data is intended to provide the researcher with a better understanding of what the smartphone can be used for at a particular point. The data collected can include three difference sources of data.

  • Apps installed - What apps are installed on the device
  • Permissions requested - What permissions have been requested by which apps. Permissions provide access to particular restricted data like phone call logs or location. See here for more informaiton.
  • Response to permission request - Has the user provided the permission or not.

Past usage

This will provide a database of what the person has used their phone for during the last couple of days (max 5 days ago). As this database is maintained by Android, it is difficult to provide much filtering at this stage.

Continuous logging

Continuous logging will record how the participants use their smartphones in the future. There are a number of features which can be included in the data recording.

  • Phone usage - record when the phone was on/off.
  • Screen usage - record when the screen was on/off.
  • app usage - record at what point apps were used and store the identity of the apps.
  • Notifications - record which apps have sent notifications.
  • Changes in installed apps - Record if any apps were installed/uninstalled.

Customise order

Customise the order in which the data is collected by dragging and dropping the text on the right hand of the screen that appears after you have demonstrated that you want a piece of data collected.

If you have fully populated the forms in the website, it might look something like this.

When you're finished

When you're done please press on the 'finished' button. This will generate a QR code, this is necessary so that we can efficently relay how you customised the app to the participants in the study. The participants will have to scan the QR code using usage logger in order to collect any data, data collection will not start if you do not scan via the usage logger app. Additionally, you can save the QR code by pressing the 'save QR' button.

This QR code will be scanned by the app and this will inform the app how it should function.

App

The app can be found here and should look something like below

All participants will need to install this app by accessing the page in the google play store and pressing install. When opening the app it should look like this.

The participant will be informed that this app is only intended for scientific research.

Then the phone will request access to the camera permission. This is essential to scan the QR code.

What appears next will be dependent on the type of phone that the participant has, newer phones will ask if permission should only be granted this time or every time when using this app; either is acceptable. Afterwards participants will be asked to press the read QR code button to scan the QR code required (produced by the customisation website; see above).

After the QR code is scanned, it will inform the participant again that this is only intended for use for scientific research

Then the participant will recieve a message about what data will be collected by the app

Another message will appear describing the data security to the participant. For a detailed guide of the security please see the preprint.

The participant will be informed about all the permission that is required to carry out the data collection. This will be either Usage permission or notification listing permission or both.

A password will then appear. This can be seen again at any point when the participant presses on the "See password" button.

Permissions

The participant will then have to accept all the permissions involved

Notification permission

For the notification permission, the participant will initially be informed of what is involved.

Then they will have to select from the apps that request the permission notification logger

On selecting usage logger, a screen like this or something similar should appear

The participant will then come into a screen where they only see a checkbox that says "Allow notification access".

A warning message will appear from Android informing of all the potential security problems that emerge as a result. While, this permission provides wide ranging capabilities, this app only record which app is providing notifications and when.

After the participant enables this permission they will return to the app, if they press back. Please do not exit the app to the home screen this may interfer with the running of the app. Instead, just press back after you have accepted this permission

Usage permission

When back at the app, if the participant is required to give the usage permission (which allows for monitoring of the app usage) they will see a pop up (like below) asking them to provide usage permission. If usage permission is not required then the app will simply start working (described below).

The usage access permission works in a very similar fashion as notification permission. The participants will initially given a message about what permission is required and what it is used for.

Then the participant will have to click on Usage Logger from the list of apps that want this permission. And then click on permit usage access. No message will appear on doing this.

After the participant enables this permission they will return to the app, if they press back. Please do not exit the app to the home screen this may interfer with the running of the app. Instead, just press back after you have accepted this permission

Running of the app

Because of the customisation website output (see above), the app will collect contextual data, then usage data and finally initiate contual logging. As a result, the app very quickly recorded the context and past usage. Messages may quickly appear in the background about what is being recorded but this will only last for a second or so.

If the app had been customised to perform the continuous logging of smartphone usage then the app would start doing this. When the participant presses next steps the continuous recording will stop and then the other data sources will be queried.

When the participant sees a screen denoting that "Status: Phone usage monitoring ongoing" then the data is being collected in the background. There is also a notification in the statusbar which informs the participant that data is being collected in the background.

When the process of collecting data is complete, the participant should press the "next step" button and a popup will inform them the final stage is to send the email to the researcher and do they wish to proceed? If they click Ok, they will be asked to select an app to supply the encrypted pdf to. We recommend gmail, all androids should have a gmail.

These are various apps that can be shared with but we have only tested with gmail.

The participant needs to communicate the password with the researcher. This should not be done via gmail or some other platform that is also used to send the data. If that method of communication is comprised then the participant's data is quite possibly reported. We recommend using qualitrics, MTurk or some other platform used to securely record the response for questionnaires.

Decryption

The website can be found here.

At this point, the data has been collected and exported to the researcher and it needs to be decrypted. While, you can open the file then enter the password and have access to the pdf table. The pdf table format of the data is not easy to analyse, it needs to be converted into a csv or other format. Various R and python packages that are employed can be used. But the packages don't seem to function well with the usage logger output. This is because those packages typically do not pay attention to the cell division and instead focus on what is on the same line. Therefore, if a long app name requires two lines then half of the name may be entered into a different row and therefore, it can be double counted.

This website, handles the decryption process specifically for the output of usage logger to acoid such errors. We strongly advise that you use it to decrypt your data

To decrypt the data that you have collected from usage logger simply click on 'select PDF' button, if you have choosen a pdf file then you will be transported to a screen where you will be asked to insert a password. Please supply the associated password, after this process is complete you should automatically have a csv file dropped into your folder with the cleaned data. It will have the same name as the file which you have supplied it.

Analysis

The analysis can be carried out in python and R. For python there are notebooks that can be found in the associated github here :

There are also R scripts that are provided here