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
  1. MOVE SDK
  2. Models

MoveServiceWarning

MOVE Models

data class MoveServiceWarning(
    val service: MoveDetectionService,
    val warnings: List<MoveWarning>
)
    
sealed class MoveWarning {

    object ActivityPermissionMissing : MoveWarning()
    object BackgroundLocationPermissionMissing : MoveWarning()
    object BluetoothPermissionMissing : MoveWarning()
    object EnergySaver : MoveWarning()
    object LocationMode : MoveWarning()
    object MockProvider : MoveWarning()
    object MockProviderLocation : MoveWarning()
    object BatteryOptimization : MoveWarning()
    object GpsOff : MoveWarning()
    object Offline : MoveWarning()
    object NoSim : MoveWarning()
    object Rooted : MoveWarning()
    object GoEdition : MoveWarning()
    object PlayServicesMissing : MoveWarning()
    object BackgroundRestricted : MoveWarning()
    object GooglePlayLocationAccuracyMissing : MoveWarning()
    object NotificationPermissionMissing : MoveWarning()
    class LocationPowerMode(val mode: Int) : MoveWarning()
    object BluetoothTurnedOff : MoveWarning()
    object BluetoothScanPermissionMissing : MoveWarning()
    object BluetoothConnectPermissionMissing : MoveWarning()
    object FineLocationPermissionMissing : MoveWarning()
    object NotificationMissing : MoveWarning()
}
struct MoveServiceWarning {
    enum Reason {
        case missingPermission([MovePermission])
    }

    var service: MoveConfig.DetectionService
    var reason: Reason
}

enum MovePermission: Int {
    case location
    case backgroundLocation
    case preciseLocation
    case motionActivity
    case gyroscope
    case accelerometer
    case bluetooth
    case bluetoothScan
}
export type WarningReasons =
  | 'BACKGROUND_LOCATION_PERMISSION_MISSING'
  | 'MOTION_PERMISSION_MISSING'
  | 'ACTIVITY_PERMISSION_MISSING'
  | 'BATTERY_OPTIMIZATION'
  | 'BLUETOOTH_TURNED_OFF'
  | 'BLUETOOTH_SCAN_PERMISSION_MISSING'
  | 'BLUETOOTH_CONNECT_PERMISSION_MISSING'
  | 'GOOGLE_PLAY_LOCATION_ACCURACY_MISSING'
  | 'NOTIFICATION_PERMISSION_MISSING'
  | 'FINE_LOCATION_PERMISSION_MISSING'
  | 'BLUETOOTH_PERMISSION_MISSING' 
  | 'NOTIFICATION_MISSING'
  | 'GO_EDITION'
  | 'ROOTED'
  | 'NO_SIM'
  | 'BACKGROUND_RESTRICTED'
  | 'MOCK_PROVIDER_LOCATION'
  | 'MOCK_PROVIDER'
  | 'LOCATION_MODE'
  | 'PLAY_SERVICES_MISSING'
  | 'LOCATION_POWER_MODE(0)'
  | 'LOCATION_POWER_MODE(1)'
  | 'LOCATION_POWER_MODE(2)'
  | 'LOCATION_POWER_MODE(3)'
  | 'LOCATION_POWER_MODE(4)'
  | 'ENERGY_SAVER';

export type IssueListService =
  | TimelineDetectionService
  | DrivingService
  | WalkingService;

export type IssueListItem<ReasonsType> = {
  reasons: Array<ReasonsType>;
  service?: IssueListService;
};

export type WarningListType = Array<IssueListItem<WarningReasons>>;
import 'package:movesdk/io/dolphin/move/move_service_warning.dart';
class MoveServiceWarning {
  final MoveDetectionService? service;
  final List<MoveWarning> reasons;
}
enum MoveWarning {
  activityPermissionMissing,
  backgroundLocationPermissionMissing,
  backgroundRestricted,
  batteryOptimization,
  bluetoothConnectPermissionMissing,
  bluetoothPermissionMissing,
  bluetoothScanPermissionMissing,
  bluetoothTurnedOff,
  energySaver,
  fineLocationPermissionMissing,
  goEdition,
  googlePlayLocationAccuracyMissing,
  gpsOff,
  locationMode,
  locationPowerMode,
  mockProvider,
  mockProviderLocation,
  noSim,
  notificationPermissionMissing,
  offline,
  playServicesMissing,
  rooted,
  notificationMissing,
}

Field

service

reason

List of optional MoveServiceWarning

LocationPowerMode

0

Either the location providers shouldn't be affected by battery saver or battery saver is off.

1

In this mode, the GPS based location provider should be disabled when battery saver is on and the device is non-interactive.

2

All location providers should be disabled when battery saver is on and the device is non-interactive.

3

In this mode, all the location providers will be kept available, but location fixes should only be provided to foreground apps.

4

In this mode, location will not be turned off, but LocationManager will throttle all requests to providers when the device is non-interactive.

PreviousMoveServiceFailureNextMoveShutdownResult

Last updated 2 months ago

see MoveDetectionService in

MoveConfig