|
| 1 | +<!-- |
| 2 | +This README describes the package. If you publish this package to pub.dev, |
| 3 | +this README's contents appear on the landing page for your package. |
| 4 | +
|
| 5 | +For information about how to write a good package README, see the guide for |
| 6 | +[writing package pages](https://dart.dev/tools/pub/writing-package-pages). |
| 7 | +
|
| 8 | +For general information about developing packages, see the Dart guide for |
| 9 | +[creating packages](https://dart.dev/guides/libraries/create-packages) |
| 10 | +and the Flutter guide for |
| 11 | +[developing packages and plugins](https://flutter.dev/to/develop-packages). |
| 12 | +--> |
| 13 | + |
| 14 | +A Flutter plugin for accessing the [Movesense](https://www.movesense.com/) family of ECG devices. This is a developer-friendly wrapper of the [mdsflutter](https://pub.dev/packages/mdsflutter) plugin. |
| 15 | + |
| 16 | +## Features |
| 17 | + |
| 18 | +This plugin supports the following features, which is the most commonly used sub-set of the total [Movensene API](https://www.movesense.com/docs/esw/api_reference/): |
| 19 | + |
| 20 | +* scan for Movensense devices (and stop scanning again) |
| 21 | +* connect and disconnect to a device |
| 22 | +* get device information |
| 23 | +* turn on/off the LED on the device |
| 24 | +* get a stream of the following data from a device: |
| 25 | + * heartrate |
| 26 | + * ECG |
| 27 | + * IMU |
| 28 | + * temperature |
| 29 | + * state events (movement, battery, connectors, double tap, tap, free fall) |
| 30 | + |
| 31 | +## Getting started |
| 32 | + |
| 33 | +Similar to the [mdsflutter](https://pub.dev/packages/mdsflutter) plugin, the Movesense library needs to be installed in your app. |
| 34 | + |
| 35 | +### iOS |
| 36 | + |
| 37 | +Install the Movesense iOS library using CocoaPods with adding this line to your app's Podfile: |
| 38 | + |
| 39 | +```shell |
| 40 | + pod 'Movesense', :git => 'ssh://git@altssh.bitbucket.org:443/movesense/movesense-mobile-lib.git' |
| 41 | +``` |
| 42 | + |
| 43 | +Then set up your `ios/Podfile` as follows: |
| 44 | + |
| 45 | +```pod |
| 46 | +target 'Runner' do |
| 47 | + use_modular_headers! |
| 48 | + use_frameworks! :linkage => :static |
| 49 | + |
| 50 | + pod 'Movesense', :git => 'https://bitbucket.org/movesense/movesense-mobile-lib.git' |
| 51 | + |
| 52 | + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) |
| 53 | +end |
| 54 | +``` |
| 55 | + |
| 56 | +This will ensure that the MDS library is linked correctly. If you need to use frameworks that demand dynamic linking, [follow the instructions here](https://bitbucket.org/movesense/movesense-mobile-lib/issues/119/cannot-use-health-and-mdsflutter-depending). |
| 57 | + |
| 58 | +### Android |
| 59 | + |
| 60 | +Download `mdslib-x.x.x-release.aar` from the [movesense-mobile-lib](https://bitbucket.org/movesense/movesense-mobile-lib/src/master/) repository and put it somewhere under 'android' folder of your app. Preferably create a new folder named `android/libs` and put it there. |
| 61 | + |
| 62 | +In the `build.gradle` of your android project, add the following lines (assuming `.aar` file is in `android/libs`): |
| 63 | + |
| 64 | +```graddle |
| 65 | +allprojects { |
| 66 | + repositories { |
| 67 | + ... |
| 68 | + flatDir{ |
| 69 | + dirs "$rootDir/libs" |
| 70 | + } |
| 71 | + } |
| 72 | +} |
| 73 | +``` |
| 74 | + |
| 75 | +## Usage |
| 76 | + |
| 77 | +TODO: Include short and useful examples for package users. Add longer examples |
| 78 | +to `/example` folder. |
| 79 | + |
| 80 | +```dart |
| 81 | +const like = 'sample'; |
| 82 | +``` |
| 83 | + |
| 84 | +## Additional information |
| 85 | + |
| 86 | +TODO: Tell users more about the package: where to find more information, how to |
| 87 | +contribute to the package, how to file issues, what response they can expect |
| 88 | +from the package authors, and more. |
0 commit comments