E4link 1.0 Sample Project
This sample project gives you the boilerplate code you need to connect to an Empatica E4 device and start streaming data.
The sample application implemented in the project has very simple functionalities:
- It initializes the E4link library with your API key.
- If the previous step is successful, it starts scanning for Empatica devices, till it finds one that can be used with the API key you inserted in the code.
- When such a device has been found, the app connects to the devices and streams data for 10 seconds, then it disconnects.
- Clone / download this repository.
- Open the sample project in Android Studio.
- Make sure you have a valid API key. You can request one for your Empatica Connect account from our Developer Area.
MainActivity.javaand assign your API key to the
- Download the Android E4 link 1.0 or newer SDK from our Developer Area.
- Unzip the archive you've downloaded and copy the
.aarfile you'll find inside into the
libsfolder contained in the sample project.
- Build and run the project.
- If a device is in range and its light is blinking green, but the app doesn't connect, please check that the discovered device can be used with your API key. If the
allowedparameter is always false, the device is not linked to your API key. Please check your Developer Area.
If you need any additional information about the Empatica API for Android, please check the official documentation.