carp_esense_package 0.1.1
carp_esense_package: ^0.1.1 copied to clipboard
The CARP eSense sampling package. Samples sensor and device events from the eSense ear plug device.
CARP eSense Sampling Package #
This library contains a sampling package for
the carp_mobile_sensing
framework
to work with the eSense earable computing platform.
This packages supports sampling of the following Measure
types(s)
esense_button
: eSense button pressed / released eventsesense_sensor
: eSense sensor (accelerometer & gyroscope) events.
See the user documentation on the eSense device for how to use the device.
See the esense
Flutter plugin and its API documentation to understand how sensor data is generated and their data formats.
See the carp_mobile_sensing
wiki for further documentation, particularly on available measure types
and sampling schemas.
For Flutter plugins for other CARP products, see CARP Mobile Sensing in Flutter.
If you're interested in writing you own sampling packages for CARP, see the description on how to extend CARP on the wiki.
Installing #
To use this package, add the following to you pubspc.yaml
file. Note that
this package only works together with carp_mobile_sensing
.
dependencies:
flutter:
sdk: flutter
carp_mobile_sensing: ^0.5.0
carp_esense_package: ^0.1.3
...
Android Integration #
Add the following to your app's manifest.xml
file located in android/app/src/main
:
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>
Note that this package only supports AndroidX. This shouldn't result in any functional changes, but it requires any Android apps using this plugin to also migrate if they're using the original support library. See Flutter AndroidX compatibility
iOS Integration #
The eSense API is not (yet) available on iOS.
Using it #
To use this package, import it into your app together with the
carp_mobile_sensing
package:
import 'package:carp_mobile_sensing/carp_mobile_sensing.dart';
import 'package:carp_esense_package/esense.dart';
Before creating a study and running it, register this package in the SamplingPackageRegistry.
SamplingPackageRegistry.register(ESenseSamplingPackage());