MoveServiceFailure
MOVE Models
data class MoveServiceFailure(
val service: MoveDetectionService,
val reasons: List<MoveError>
)
sealed class MoveError {
AccelerometerMissing,
BatteryPermissionMissing,
InternetPermissionMissing,
LocationPermissionMissing,
MotionPermissionMissing,
NotificationMissing,
OverlayPermissionMissing,
PhonePermissionMissing,
Unauthorized
}
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 declare type ErrorReasons = 'BACKGROUND_LOCATION_PERMISSION_MISSING' | 'LOCATION_PERMISSION_MISSING' | 'MOTION_PERMISSION_MISSING' | 'BATTERY_OPTIMIZATION' | 'BATTERY_PERMISSION_MISSING' | 'BLUETOOTH_PERMISSION_MISSING' | 'NO_ACCELEROMETER';
export declare type ErrorListService = 'DRIVING[]' | 'DRIVING[DRIVING_BEHAVIOUR]' | 'DRIVING[DISTRACTION_FREE_DRIVING]' | 'DRIVING[DRIVING_BEHAVIOUR, DISTRACTION_FREE_DRIVING]' | 'DRIVING[DISTRACTION_FREE_DRIVING, DRIVING_BEHAVIOUR]' | 'WALKING[]' | 'WALKING[LOCATION]' | 'CYCLING' | 'PUBLIC_TRANSPORT' | 'AUTOMATIC_IMPACT_DETECTION' | 'POINTS_OF_INTEREST';
export declare type ErrorListItem = {
reasons: Array<ErrorReasons>;
service?: ErrorListService;
};
export declare type ErrorListType = Array<ErrorListItem>;
Field | |
service | MoveConfig DetectionService |
reason | List of required Permissions, or unauthorized if not in server config. |
Last updated