Skip to content

Commit 6d829a3

Browse files
Wrong key was used
1 parent 737ef12 commit 6d829a3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

android/src/main/kotlin/com/icapps/background_location_tracker/MethodCallHelper.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ internal class MethodCallHelper(private val ctx: Context) : MethodChannel.Method
3737
val enableNotificationLocationUpdatesKey = "android_config_enable_notification_location_updates"
3838
val enableCancelTrackingActionKey = "android_config_enable_cancel_tracking_action"
3939
val cancelTrackingActionTextKey = "android_config_cancel_tracking_action_text"
40+
val distanceFilterKey = "android_distance_filter"
4041
val keys = listOf(
4142
callbackHandleKey,
4243
loggingEnabledKey,
@@ -57,7 +58,7 @@ internal class MethodCallHelper(private val ctx: Context) : MethodChannel.Method
5758
val cancelTrackingActionText = call.argument<String>(cancelTrackingActionTextKey)!!
5859
val enableCancelTrackingAction = call.argument<Boolean>(enableCancelTrackingActionKey)!!
5960
val trackingInterval = call.argument<Long>(trackingIntervalKey)!!
60-
val distanceFilter = (call.argument<Double>(trackingIntervalKey) ?: 0.0).toFloat()
61+
val distanceFilter = (call.argument<Double>(distanceFilterKey) ?: 0.0).toFloat()
6162
SharedPrefsUtil.saveLoggingEnabled(ctx, loggingEnabled)
6263
SharedPrefsUtil.saveTrackingInterval(ctx, trackingInterval)
6364
SharedPrefsUtil.saveDistanceFilter(ctx, distanceFilter)

0 commit comments

Comments
 (0)