Android only params
This commit is contained in:
parent
6e3532f9fd
commit
9ba5716e35
1 changed files with 20 additions and 15 deletions
|
|
@ -72,28 +72,33 @@ class Preferences {
|
||||||
_ => bg.DesiredAccuracy.medium,
|
_ => bg.DesiredAccuracy.medium,
|
||||||
},
|
},
|
||||||
distanceFilter: isHighestAccuracy ? 0 : instance.getInt(distance)?.toDouble(),
|
distanceFilter: isHighestAccuracy ? 0 : instance.getInt(distance)?.toDouble(),
|
||||||
locationUpdateInterval: isHighestAccuracy ? 0 : (locationUpdateInterval > 0 ? locationUpdateInterval : null),
|
locationUpdateInterval: Platform.isAndroid
|
||||||
fastestLocationUpdateInterval: isHighestAccuracy ? 0 : fastestLocationUpdateInterval,
|
? (isHighestAccuracy ? 0 : (locationUpdateInterval > 0 ? locationUpdateInterval : null))
|
||||||
|
: null,
|
||||||
|
fastestLocationUpdateInterval: Platform.isAndroid ? (isHighestAccuracy ? 0 : fastestLocationUpdateInterval) : null,
|
||||||
disableElasticity: true,
|
disableElasticity: true,
|
||||||
pausesLocationUpdatesAutomatically: Platform.isIOS ? !(isHighestAccuracy || instance.getBool(stopDetection) == false) : null,
|
pausesLocationUpdatesAutomatically: Platform.isIOS ? !(isHighestAccuracy || instance.getBool(stopDetection) == false) : null,
|
||||||
showsBackgroundLocationIndicator: false,
|
showsBackgroundLocationIndicator: false,
|
||||||
),
|
),
|
||||||
app: bg.AppConfig(
|
app: bg.AppConfig(
|
||||||
enableHeadless: true,
|
enableHeadless: Platform.isAndroid ? true : null,
|
||||||
stopOnTerminate: false,
|
stopOnTerminate: false,
|
||||||
startOnBoot: true,
|
startOnBoot: Platform.isAndroid ? true : null,
|
||||||
heartbeatInterval: heartbeatInterval > 0 ? heartbeatInterval.toDouble() : null,
|
heartbeatInterval: heartbeatInterval > 0 ? heartbeatInterval.toDouble() : null,
|
||||||
preventSuspend: heartbeatInterval > 0,
|
preventSuspend: Platform.isIOS ? (heartbeatInterval > 0) : null,
|
||||||
backgroundPermissionRationale: bg.PermissionRationale(
|
backgroundPermissionRationale: Platform.isAndroid
|
||||||
title: 'Allow {applicationName} to access this device\'s location in the background',
|
? bg.PermissionRationale(
|
||||||
message: 'For reliable tracking, please enable {backgroundPermissionOptionLabel} location access.',
|
title: 'Allow {applicationName} to access this device\'s location in the background',
|
||||||
positiveAction: 'Change to {backgroundPermissionOptionLabel}',
|
message: 'For reliable tracking, please enable {backgroundPermissionOptionLabel} location access.',
|
||||||
negativeAction: 'Cancel'
|
positiveAction: 'Change to {backgroundPermissionOptionLabel}',
|
||||||
),
|
negativeAction: 'Cancel')
|
||||||
notification: bg.Notification(
|
: null,
|
||||||
smallIcon: 'drawable/ic_stat_notify',
|
notification: Platform.isAndroid
|
||||||
priority: bg.NotificationPriority.low,
|
? bg.Notification(
|
||||||
),
|
smallIcon: 'drawable/ic_stat_notify',
|
||||||
|
priority: bg.NotificationPriority.low,
|
||||||
|
)
|
||||||
|
: null,
|
||||||
),
|
),
|
||||||
http: bg.HttpConfig(
|
http: bg.HttpConfig(
|
||||||
autoSync: false,
|
autoSync: false,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue