What's new on Beiwe

Digital phenotyping research platform

Coming Soon
June 26, 2020

Foreground Service: Android 9+ problem with background data collection

Our development team will be creating a Foreground Service for Android phones to improve data collection on phones running Android 9+.

Starting in Android 9, the Android operating system blocks apps from receiving accelerometer and gyroscope data while they're in the background (i.e., the majority of the time for Beiwe).

This doesn't affect GPS/location data or any of the other data streams besides accelerometer and gyroscope. Android 9 was released in August 2018, and we first started seeing a significant number of Android 9 phones on Beiwe in early 2019 (Sentry's error logs tell us what Android version the phone is running).

The only way to get accelerometer and gyroscope data while the app is in the background is to create an Android "Foreground Service". A Foreground Service shows a constant notification whenever it's running. It's traditionally intended for apps that play music, podcasts, or other audio; it's designed to let you close the app and have the audio keep playing. However, for Beiwe it will allow the app to run in the background and collect data while the app is not actively in use. Once this is built we should see significant improvement in data collection for Android phones running Beiwe.

- Beiwe team

We are ⚡by Beamer