Skip to content
Application to be run on an Android device to interact with the wearable devices & phone sensors for passive data streaming
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
app Bumped version code until the release was accepted Mar 20, 2019


Application to be run on an Android 5 (or later) device. If Bluetooth devices are to be used, the Android device should support Bluetooth Low Energy (Bluetooth 4.0 or later).


To clone this respository, use the command

git clone


Modifyapp/src/main/res/xml/remote_config_defaults.xml. These are the configuration defaults for the app.

  • Set the kafka_rest_proxy_url and the schema_registry_url. If the app should not upload any data, leave them blank.
  • Set the device_group_id string to a suitable user ID.

Get other possible parameters from the README of radar-commons-android and those from the plugins below.


This application depends on plugins to collect information. The application currently supports plugins the following plugins:

See the link to each plugin for its installation instructions. In general, a dependency needs to be added in build.gradle, and a service needs to be aded in the device_services_to_connect property in app/src/main/res/xml/remote_config_defaults.xml.

Setup Firebase Remote Configuration

Firebase can be used to remotely configure some device and system parameters, e.g. the E4 API key, kafka server address and upload rate. The default parameters are also stored locally in app/src/main/res/xml/remote_config_defaults.xml, which will be used if the remote parameters cannot be accessed.

  1. Install the Firebase SDK in Android Studio.
  2. Login to a Google account.
  3. In the Firebase console, add the app ( to a new Firebase project.
  4. Download the google-services.json from the Firebase console (under Project Settings) and move the file to the common-android/ folder.
  5. [Optional] Set the parameter values on the server. The avaiable parameters can be found in app/src/main/res/xml/remote_config_defaults.xml. Note - Set the unsafe_kafka_connection parameter to true if the server with kafka and schema-registry is using a self-signed certificate over SSL. If the certificate is issued by a valid CA then leave it to false. In production, do NOT set this value to true.

Full Firebase guide


To add additional plugins to this application, make the following steps (see the Phone plugin as an example):

  • Add the schemas of the data you intend to send to the RADAR-base Schemas repository. Your record keys should be org.radarcns.kafka.ObservationKey. Be sure to set the namespace property to org.radarcns.mydevicetype so that generated classes will be put in the right package. All values should have time and timeReceived fields, with type double. These represent the time in seconds since the Unix Epoch (1 January 1970, 00:00:00 UTC). Subsecond precision is possible by using floating point decimals.
  • Create a new package org.radarcns.mydevicetype. In that package, create classes that:
    • implement to connect to a device and collect its data.
    • implement to keep the current state of the device.
    • subclass to run the device manager in.
    • subclass a singleton that contains all Kafka topics that the wearable will generate.
    • subclass a that exposes the new service.
  • Add a new service element to AndroidManifest.xml, referencing the newly created device service.
  • Add the DeviceServiceProvider you just created to the device_services_to_connect property in app/src/main/res/xml/remote_config_defaults.xml.

This plugin can remain a separate github repository, but it should be published to Bintray for easy integration.

Android Installation

The guide for installing Android on Raspberry Pi3 and UDOO boards is available here

You can’t perform that action at this time.