watch_connectivity_garmin 0.1.6 copy "watch_connectivity_garmin: ^0.1.6" to clipboard
watch_connectivity_garmin: ^0.1.6 copied to clipboard

Wrapper for the ConnectIQ SDK to communicate with Garmin watches

A wrapper for the ConnectIQ SDK to communicate with Garmin watches

NOTE #

By using this plugin, you accept the ConnectIQ license agreement.

Getting Started #

iOS podfile changes:

platform :ios, '13.0'

iOS Info.plist changes:

<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleTypeRole</key>
        <string>None</string>
        <key>CFBundleURLName</key>
        <string>{your.bundle.identifier}</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>{your-unique-string}</string>
        </array>
    </dict>
</array>
<key>LSApplicationQueriesSchemes</key>
<array>
    <string>gcm-ciq</string>
</array>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>Used to connect to wearable devices</string>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>Used to connect to wearable devices</string>
<key>UIBackgroundModes</key>
<array>
    <string>bluetooth-central</string>
</array>

Usage #

import 'dart:io';

import 'package:watch_connectivity_garmin/watch_connectivity_garmin.dart';

void example() {
  final watch = WatchConnectivityGarmin();

  // Must be called before any other methods
  watch.initialize(
    GarminInitializationOptions(
      applicationId: 'your-application-id',
      urlScheme: 'your-url-scheme',
    ),
  );

  if (Platform.isIOS) {
    // On iOS, the Garmin Connect app must be launched to retrieve a list of
    // paired devices. This should be user-initiated, as the process will
    // suspend your app.
    watch.showDeviceSelection();
  }

  // Use as you would WatchConnectivity
}

Unsupported Features #

The following features are not supported by Garmin watches:

  • Application context

Attempted usage of these features will throw an UnsupportedError

Additional Information #

See watch_connectivity for more detailed documentation

5
likes
160
pub points
39%
popularity

Publisher

verified publisherrexios.dev

Wrapper for the ConnectIQ SDK to communicate with Garmin watches

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter, recase, watch_connectivity_platform_interface

More

Packages that depend on watch_connectivity_garmin