Name: RADAR-AndroidApplication
Owner: The Hyve
Description: Application to be run on a Raspberry Pi3 to interact with the wearable devices
Forked from: RADAR-CNS/radar-prmt-android
Created: 2016-10-11 09:05:14.0
Updated: 2017-04-05 08:08:11.0
Pushed: 2017-12-14 14:59:06.0
Homepage: null
Size: 2551
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.
Currently only the Empatica E4 is supported.
First, request an Empatica API key for your Empatica Connect account from our Developer Area. Also download the Empatica Android SDK there.
empalink-2.0
directory.apikey.xml
file and enter your Empatica API key in the apikey xml element.server.xml
file and add the URLs of the Kafka REST Proxy and the Schema Registry. If the app should not upload any data, leave them blank.apikey.xml
and server.xml
files to the app/src/main/res/values/
directory.app/src/main/res/values/device.xml
file by setting the group_id
string to a suitable user ID../gradlew build
.To run this app with a Pebble 2 device, the RADAR-CNS app must be installed on the Pebble 2. For now, install the Pebble SDK on your machine. Go to the pebble2/
directory. There we can use the Pebble command line tools. First, build the app with
le build
Then run the following sequence:
pebble install --phone 1.2.3.4
with the IP address stated in the Pebble app on your phone.The RADAR-CNS Pebble app will now send data to the endpoint.
To send some mock data to a Confluent Kafka set up on localhost, run ./gradlew :app:cleanTest :app:test
. If the Confluent Kafka setup is running elsewhere, edit app/src/test/resources/org/radarcns/kafka/kafka.properties
accordingly.
To add additional device types to this application, make the following steps (see the org.radarcns.pebble2
package as an example):
avro/src/main/resources/avro
directory, create the Avro schemas for your record values. Your record keys should be 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.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.DeviceService
to run the device manager in.org.radarcns.android.DeviceTopics
that contains all Kafka topics that the wearable will generate.org.radarcns.android.empaticaE4.MainActivity
to run a service for showing the device data and for controlling the recording.Make a pull request once the code is working.
The guide for installing Android on Raspberry Pi3 and UDOO boards is available here