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)';
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,
}
Last updated