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
  • Required Permissions
  • Special Permissions
  • Android
  • iOS
  1. MOVE SDK
  2. Appendix
  3. React Native

Permission Handling

PreviousReact NativeNextMOVE Backend

Last updated 1 year ago

Required Permissions

The required permissions for the individual services vary according to the platform type. See the sections Permissions Handling for and respectively.

Missing required and optional permissions will be reported by the SDK through the MoveServiceFailure and MoveServiceWarning listeners and listed individually so there is no need for the application to do it's own permission checks except during the onboarding process where user permission must be queried.

In best practice, this onboarding step is performed before any setup of the SDK happens, but permission changes at any later point in time is possible.

If permission checks happen at a later point make sure to call the MoveSdk.resolveError() function to ensure a timely activation of the affected services.

Due to Apple's static code analysis additional strings must be configured in the Info.plist to pass validation when uploading to the AppStoreandTestflight even when this feature is not used. See section for details.

Special Permissions

Due to the fact that some permission requests are not available directly from react native, the SDK offers an api that can be used to request the necessary permissions and check the status of those permissions:

Android

Draw Overlays

Ask for draw over other apps permission:

MoveSdk.requestDrawOverlaysPermission(): void

Check if draw over other apps permission is granted:

MoveSdk.canDrawOverlays(): Promise<boolean>

Ignoring Battery Optimisation

Ask for ignoring battery optimisation for this app:

MoveSdk.requestAppIgnoringBatteryOptimization(): void

Check if battery optimisation is ignored for this app:

MoveSdk.isAppIgnoringBatteryOptimization(): Promise<boolean>

iOS

Motion Permission

ios.permission.MOTION is available directly from react native, but requesting this permission via react native on simulators could be problematic. This method helps to request motion permission on simulators:

MoveSdk.requestMotionPermission(): void
iOS
Android
iOS Permission Handling