MoveServiceFailure
MOVE Models
data class MoveServiceFailure(
val service: MoveDetectionService,
val reasons: List<MoveError>
)
sealed class MoveError {
object Unauthorized : MoveError()
object InternetPermissionMissing : MoveError()
object LocationPermissionMissing : MoveError()
object PhonePermissionMissing : MoveError()
object OverlayPermissionMissing : MoveError()
object MotionPermissionMissing : MoveError()
object BackgroundLocationPermissionMissing : MoveError()
object BatteryPermissionMissing : MoveError()
object AccelerometerMissing : MoveError()
}
struct MoveServiceFailure {
enum Reason {
case unauthorized
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
}
export type ErrorReasons =
| 'BACKGROUND_LOCATION_PERMISSION_MISSING'
| 'LOCATION_PERMISSION_MISSING'
| 'MOTION_PERMISSION_MISSING'
| 'ACTIVITY_PERMISSION_MISSING'
| 'BATTERY_PERMISSION_MISSING'
| 'UNAUTHORIZED'
| 'INTERNET_PERMISSION_MISSING'
| 'PHONE_PERMISSION_MISSING'
| 'OVERLAY_PERMISSION_MISSING'
| 'ACCELEROMETER_MISSING'
| 'GOOGLE_PLAY_LOCATION_ACCURACY_MISSING';
export type IssueListService =
| TimelineDetectionService
| DrivingService
| WalkingService;
export type IssueListItem<ReasonsType> = {
reasons: Array<ReasonsType>;
service?: IssueListService;
};
export type ErrorListType = Array<IssueListItem<ErrorReasons>>;
import 'package:movesdk/io/dolphin/move/move_service_warning.dart';
class MoveServiceError {
final MoveDetectionService service;
final List<MoveError> reasons;
}
enum MoveError {
accelerometerMissing,
activityPermissionMissing,
backgroundLocationPermissionMissing,
batteryPermissionMissing,
bluetoothScanPermissionMissing,
googlePlayLocationAccuracyMissing,
gyroscopeMissing,
internetPermissionMissing,
locationPermissionMissing,
motionPermissionMissing,
phonePermissionMissing,
preciseLocationPermissionMissing,
overlayPermissionMissing,
unauthorized,
}
Field
service
see MoveDetectionService
in MoveConfig
Last updated