Skip to content

Commit a7e618b

Browse files
committed
update of README
1 parent 4117533 commit a7e618b

2 files changed

Lines changed: 17 additions & 39 deletions

File tree

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,19 @@
33
This repo contains the source code for Flutter first-party plugins maintained by the [Copenhagen Research Platform (CARP)](http://www.carp.dk/) team at the Technical University of Denmark.
44
Check the `packages` directory for all plugins.
55

6-
Flutter plugins enable access to platform-specific APIs using a platform channel.
6+
Flutter plugins enable access to platform-specific APIs using a platform channel.
77
For more information about plugins and how to use them, see
88
[https://flutter.io/platform-plugins/](https://flutter.io/platform-plugins/).
99

1010
## Plugins
11+
1112
These are the available plugins in this repository.
1213

13-
| Plugin | Description | Android | iOS | pub.dev |
14+
| Plugin | Description | Android | iOS | pub.dev |
1415
|--------|-------------|:-------:|:---:|:---------:|
1516
| [screen_state](./packages/screen_state) | Track screen state changes | ✔️ | ✔️ | [![pub package](https://img.shields.io/pub/v/screen_state.svg)](https://pub.dartlang.org/packages/screen_state) |
1617
| [light](./packages/light) | Track light sensor readings | ✔️ || [![pub package](https://img.shields.io/pub/v/light.svg)](https://pub.dartlang.org/packages/light) |
17-
| [pedometer](./packages/pedometer) | Track step count | ✔️ | ✔️ | [![pub package](https://img.shields.io/pub/v/pedometer.svg)](https://pub.dartlang.org/packages/pedometer) |
18+
| [pedometer](./packages/pedometer) | Collect step events | ✔️ | ✔️ | [![pub package](https://img.shields.io/pub/v/pedometer.svg)](https://pub.dartlang.org/packages/pedometer) |
1819
| [noise_meter](./packages/noise_meter) | Read noise level in Decibel | ✔️ | ✔️ | [![pub package](https://img.shields.io/pub/v/noise_meter.svg)](https://pub.dartlang.org/packages/noise_meter) |
1920
| [app_usage](./packages/app_usage) | Track usage of all applications on phone. | ✔️ || [![pub package](https://img.shields.io/pub/v/app_usage.svg)](https://pub.dartlang.org/packages/app_usage) |
2021
| [weather](./packages/weather) | Get current weather, as well as forecasting using the OpenWeatherMap API. | ✔️ | ✔️ | [![pub package](https://img.shields.io/pub/v/weather.svg)](https://pub.dartlang.org/packages/weather) |
@@ -35,9 +36,7 @@ Please check existing issues and file any new issues, bugs, or feature requests
3536

3637
## Contributing
3738

38-
As part of the open-source Flutter ecosystem, we would welcome any help in maintaining and enhancing these plugins.
39+
As part of the open-source Flutter ecosystem, we would welcome any help in maintaining and enhancing these plugins.
3940
We (i.e., the CARP team) have limited resources for maintaining these plugins, and we rely on **your** help in this.
4041
We welcome any contribution - from small error corrections in the documentation, to bug fixes, to large feature enhancements, or even new features in a plugin.
4142
If you wish to contribute to any of the plugins in this repo, please review our [contribution guide](https://github.com/cph-cachet/flutter-plugins/CONTRIBUTING.md) and send a [pull request](https://github.com/cph-cachet/flutter-plugins/pulls).
42-
43-

packages/empatica_e4link/README.md

Lines changed: 12 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
# Empatica Flutter plugin
22

3-
Flutter plugin for the [Empatica E4](https://e4.empatica.com/e4-wristband)
4-
wristband on Android. iOS coming soon.
3+
Flutter plugin for the [Empatica E4](https://e4.empatica.com/e4-wristband) wristband on Android.
54

65
## Install (Flutter)
76

8-
Add `empatica_e4link` as a dependency in `pubspec.yaml` or run `flutter pub add
9-
empatica_e4link`
7+
Add `empatica_e4link` as a dependency in `pubspec.yaml` or run `flutter pub add empatica_e4link`
108
For help on adding as a dependency, view the [pubspec documenation](https://flutter.io/using-packages/).
119

1210
## Android
1311

14-
The package uses your location and bluetooth to fetch data from the eSense ear plugs.
15-
Therefore location tracking and bluetooth must be enabled.
12+
The package uses bluetooth to fetch data from the E4 device. Therefore bluetooth usage must be declared. Since bluetooth also allow for locations tracking, location tracking permissions must also be declared.
1613

1714
Add the following entry to your `manifest.xml` file, in the Android project of your application:
1815

@@ -24,35 +21,25 @@ Add the following entry to your `manifest.xml` file, in the Android project of y
2421
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>
2522
```
2623

27-
Also make sure to obtain permissions in your app to use location and bluetooth.
28-
See the example app on how to e.g. use the [`permission_handler`](https://pub.dev/packages/permission_handler) for this. Note that the plugin **does not** handle permissions - this has to be done on an app level.
24+
Also make sure to obtain permissions in your app to use location and bluetooth. See the example app on how to e.g. use the [`permission_handler`](https://pub.dev/packages/permission_handler) for this. Note that the plugin **does not** handle permissions - this has to be done on an app level.
2925

30-
Set the Android compile and minimum SDK versions to `compileSdkVersion 33`,
31-
and `minSdkVersion 28` respectively, inside the `android/app/build.gradle` file.
26+
Set the Android compile and minimum SDK versions to `compileSdkVersion 33`, and `minSdkVersion 28` respectively, inside the `android/app/build.gradle` file.
3227

3328
## iOS
3429

3530
Due to compatibility issues with Empatica's SDK, the iOS implementation is not able to function with new CocoaPods and iPhone architectures.
3631

3732
## Usage
3833

39-
The Empatica E4 Flutter plugin has been designed to resemble the Android
40-
Empatica API almost **1:1**. Hence, you should be able to recognize the names
41-
of the different classes and class variables.
42-
For example, the methods on the `EmpaticaDeviceManager` class is mapped 1:1.
43-
See the [Empatica Android documentation](https://developer.empatica.com/empatica-android-sdk-javadoc.zip) on how it all works.
34+
The Empatica E4 Flutter plugin has been designed to resemble the Android Empatica API almost **1:1**. Hence, you should be able to recognize the names of the different classes and class variables. For example, the methods on the `EmpaticaDeviceManager` class is mapped 1:1. See the [Empatica Android documentation](https://developer.empatica.com/empatica-android-sdk-javadoc.zip) on how it all works.
4435

45-
However, one major design change has been done; this Empatica Flutter plugin complies to the Dart/Flutter reactive programming architecture using [Stream](https://api.dart.dev/dart-async/Stream-class.html)s.
46-
Hence, you do not get callbacks to an Empatica device (as you do in Java) -- rather, you obtain a Dart stream and listen to this stream (and exploit all the [other very nice stream operations](https://dart.dev/tutorials/language/streams) which are available in Dart).
47-
Below, we shall describe how to use the Empatica streams.
48-
But first -- let's see how to set up and connect to an Empatica E4 device in the first place.
36+
However, one major design change has been done; this Empatica Flutter plugin complies to the Dart/Flutter reactive programming architecture using [Stream](https://api.dart.dev/dart-async/Stream-class.html)s. Hence, you do not get callbacks to an Empatica device (as you do in Java) -- rather, you obtain a Dart stream and listen to this stream (and exploit all the [other very nice stream operations](https://dart.dev/tutorials/language/streams) which are available in Dart). Below, we shall describe how to use the Empatica streams. But first -- let's see how to set up and connect to an Empatica E4 device in the first place.
4937

5038
### Setting up and Connecting to an Empatica Device
5139

5240
All operations on the Empatica device happens via the `Empatica plugin`
5341

54-
At first one must connect to the Empatica backend via an API key given by
55-
Empatica using the `authenticateWithAPIKey` method.
42+
At first one must connect to the Empatica backend via an API key given by Empatica using the `authenticateWithAPIKey` method.
5643

5744
```dart
5845
import 'package:empatica_e4link/empatica.dart';
@@ -85,18 +72,13 @@ await deviceManager.startScanning();
8572
8673
```
8774

88-
Everything with the Empatica API happens asynchronously. Hence, the `connectDevice` call merely initiates the connection
89-
process. In order to know the status of the device manager, you should listen to
90-
status events `statusEventSink`.
75+
Everything with the Empatica API happens asynchronously. Hence, the `connectDevice` call merely initiates the connection process. In order to know the status of the device manager, you should listen to status events `statusEventSink`.
9176
This is done via the `statusEventSink` stream.
92-
Note, that if you want to know if your connection to the device is successful, you should initiate listening
93-
**before** the connection is initiated, as shown above.
77+
Note, that if you want to know if your connection to the device is successful, you should initiate listening **before** the connection is initiated, as shown above.
9478

9579
### Listen to physiological data
9680

97-
When the status is `CONNECTED` the device will be sending all data events to
98-
`dataEventSink`. To get _ALL_ data one should start listening on this stream
99-
before it is connected, e.g. when the status is `CONNECTING`.
81+
When the status is `CONNECTED` the device will be sending all data events to `dataEventSink`. To get _ALL_ data one should start listening on this stream before it is connected, e.g. when the status is `CONNECTING`.
10082

10183
```dart
10284
deviceManager.dataEventSink?.listen((event) {
@@ -120,7 +102,4 @@ The possible data events in the `dataEventSink` are:
120102

121103
## Contributing
122104

123-
### Android
124-
125-
The Gradle task useAar in ./android has to be run for the Empatica SDK to be
126-
modeled and used in the Android code.
105+
The Gradle task useAar in `./android` has to be run for the Empatica SDK to be modeled and used in the Android code.

0 commit comments

Comments
 (0)