Name: radar-prmt-android
Owner: RADAR-CNS
Owner: RADAR-CNS
Description: Application to be run on an Android device to interact with the wearable devices & phone sensors for passive data streaming
Created: 2016-09-27 13:51:06.0
Updated: 2017-11-10 13:16:29.0
Pushed: 2018-01-26 16:11:50.0
Size: 2504
Language: Java
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Application to be run on an Android 4.4 (or later) device with Bluetooth Low Energy (Bluetooth 4.0 or later), to interact with wearable devices. The app is cloned from the [Empatica sample app][2].
Currently the Empatica E4 and Pebble 2 are supported. Also note that the application only runs on an ARM architecture.
To clone this respository, use the command
clone --recursive https://github.com/RADAR-CNS/RADAR-AndroidApplication.git
If the repository is already cloned, go to the source directory and run
submodule update --init --recursive
Copy the src/main/res/xml/remote_config_defaults_TEMPLATE.xml
from the RADAR-Commons repository to app/src/main/res/xml/remote_config_defaults.xml
. These are the configuration defaults for the app.
kafka_rest_proxy_url
and the schema_registry_url
. If the app should not upload any data, leave them blank.device_group_id
string to a suitable user ID.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
.
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.
org.radarcns.android
) to a new Firebase project.google-services.json
from the Firebase console (under Project Settings) and move the file to the common-android/
folder.app/src/main/res/xml/remote_config_defaults_TEMPLATE.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
.To add additional plugins to this application, make the following steps (see the Pebble plugin as an example):
org.radarcns.key.MeasurementKey
. 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.org.radarcns.mydevicetype
. In that package, create classes that:org.radarcns.android.device.DeviceManager
to connect to a device and collect its data.org.radarcns.android.DeviceState
to keep the current state of the device.org.radarcns.android.device.DeviceService
to run the device manager in.org.radarcns.android.device.DeviceTopics
that contains all Kafka topics that the wearable will generate.org.radarcns.android.device.DeviceServiceProvider
that exposes the new service.AndroidManifest.xml
, referencing the newly created device service.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.
The guide for installing Android on Raspberry Pi3 and UDOO boards is available here