polar 1.8.0 copy "polar: ^1.8.0" to clipboard
polar: ^1.8.0 copied to clipboard

outdated

This is a Dart plugin wrapper for the Polar SDK on Android and iOS

polar #

Plugin wrapper for the Polar SDK

Getting Started #

Android #

android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="android.permission.BLUETOOTH_SCAN" android:usesPermissionFlags="neverForLocation" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" android:maxSdkVersion="30" />

If you use BLUETOOTH_SCAN to determine location, remove android:usesPermissionFlags="neverForLocation"

If you use location services in your app, remove android:maxSdkVersion="30" from the location permission tags

iOS #

Change the deployment target in Xcode to iOS 13+

Podfile:

platform :ios, '13.0'

Info.plist:

<key>NSBluetoothAlwaysUsageDescription</key>
<string>Used to connect to Polar devices</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>Used to connect to Polar devices</string>
<key>UIBackgroundModes</key>
<array>
  <string>bluetooth-central</string>
</array>

Use it #

polar = Polar();
polar.heartRateStream.listen((e) => print('Heart rate: ${e.data.hr}'));
polar.streamingFeaturesReadyStream.listen((e) {
  if (e.features.contains(DeviceStreamingFeature.ecg)) {
    polar
        .startEcgStreaming(e.identifier)
        .listen((e) => print('ECG data: ${e.samples}'));
  }
});
21
likes
0
pub points
80%
popularity

Publisher

verified publisherrexios.dev

This is a Dart plugin wrapper for the Polar SDK on Android and iOS

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

device_info_plus, flutter, permission_handler, recase

More

Packages that depend on polar