Dolphin MOVE SDK
2.x
2.x
  • Introduction
  • MOVE Services
  • MOVE SDK
    • Getting Started
      • MOVE Dashboard
        • Access Control
        • Configuration
        • Timeline
        • Points of Interest
      • Android
        • Installation
        • Quick Start
      • iOS
        • Installation
        • Quick Start
        • Troubleshooting
      • React Native
      • Flutter
      • Move SDK CLI
    • API Interface
      • Android
        • Initialization
        • Services
      • iOS
        • Initialization
        • Setup
        • Services
      • React Native
        • Components
        • Initialization
        • Services
      • Flutter
        • Initialization
        • Services
    • Models
      • Listeners/Callbacks
      • MoveAssistanceCallStatus
      • MoveAuth
      • MoveAuthError
      • MoveAuthResult
      • MoveAuthState
      • MoveConfig
      • MoveConfigurationError
      • MoveDevice
      • MoveDeviceStatus
      • MoveGeocodeError
      • MoveHealthItem
      • MoveHealthScore
      • MoveOptions
        • DeviceDiscovery
      • MoveSdkState
      • MoveSdkAndroidConfig
      • MoveTripState
      • MoveScanResult
      • MoveServiceFailure
      • MoveServiceWarning
      • MoveShutdownResult
    • Appendix
      • Token refresh
      • Android
        • Permission Handling
          • Permission Overview
          • Runtime Permissions
        • Battery optimization
        • Notification Management
      • iOS
        • Permissions Handling
        • App Store
      • React Native
        • Permission Handling
  • MOVE Backend
    • MOVE Backend
      • MOVE Admin API
      • MOVE TIMELINE API
      • MOVE State API
      • MOVE Last Location API
    • MOVE Generic Notifier
    • MOVE Assistance Notifier
    • Example requests
  • FAQ
  • Changelog
    • Android
    • iOS
    • React
    • Flutter
    • Backend
  • Data privacy (GDPR)
Powered by GitBook
On this page
  • Installation
  • iOS
  • Initialization
  • Setting up Permissions
  • Android
  • Initialization
  • Setting up Permissions
  1. MOVE SDK
  2. Getting Started

Flutter

Getting Started

PreviousReact NativeNextMove SDK CLI

Last updated 2 months ago

A wrapper for the MOVE SDK is available for Google's Flutter framework and published on pub.dev.

Installation

Add the Dolphin MOVE SDK package to your flutter app using:

flutter pub add movesdk

or, by adding it as a dependency to your pubspec.yaml file and run:

flutter pub get

Add the following section within the root build.gradle.

allprojects {
    repositories {
        google()
        mavenCentral()
        maven {
            url "https://dolphin.jfrog.io/artifactory/move-sdk-libs-release"
        }
    }
}

Also please check if the following values are set within the app build.gradle.

minSdkVersion 26 or higher compileSdkVersion 34 targetSdkVersion 34

android {
    compileSdkVersion 34
    // ...
    // ...
    defaultConfig {
        // ...
        // ...
        minSdkVersion 26
        targetSdkVersion 34
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        // ...
        // ...
    }
    // ...
    // ...
}

Import the package in your code:

import 'package:movesdk/movesdk.dart';

iOS

Initialization

The SDK will be automatically initialized and load its persisted state in the plugin's lifecycle through theFlutterAppDelegate.

Setting up Permissions

The MOVE SDK requires several permissions to function.

Android

Initialization

The SDK needs to be initialized at the start of the app by calling MoveSdk.init. It is recommended to put this in the Application's onCreate method. This will load the persistent Move SDK state.

import io.dolphin.move.MoveSdk

class MainApplication : Application() {
    override fun onCreate() {
        super.onCreate()
        val sdk = MoveSdk.init(this)
        ...
    }
    
    ...
}

Setting up Permissions

Permission setup is inherited automatically.

See for further information regarding package use.

See the included example () project in the package for reference on how to get started.

Make sure required are added in your iOS Runner.workspace and also the corresponding strings for requesting user permissions are set in the projects Info.plist.

If you are using the package refer to (see also ) to add the permissions in your iOS Podspec file.

https://pub.dev/packages/movesdk
Flutter - Using packages
move-sdk-flutter/example
permissions
flutter-permission-handler
this guide
here
Location updates background mode capability