From 3540da135dbf183cca8c39d4d74c269f07d0c7be Mon Sep 17 00:00:00 2001 From: GwonHyeok Date: Fri, 5 Jul 2024 19:30:55 +0000 Subject: [PATCH] Fix issue in already submitted reply --- android/src/main/kotlin/com/example/pedometer_2/ReadSteps.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/android/src/main/kotlin/com/example/pedometer_2/ReadSteps.kt b/android/src/main/kotlin/com/example/pedometer_2/ReadSteps.kt index 633c9de..0de681d 100644 --- a/android/src/main/kotlin/com/example/pedometer_2/ReadSteps.kt +++ b/android/src/main/kotlin/com/example/pedometer_2/ReadSteps.kt @@ -33,11 +33,13 @@ fun getSteps(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding, startTime if (hasMinPlayServices != ConnectionResult.SUCCESS) { // Prompt user to update their device's Google Play services app and return result.error("2", "Min playService version error", "${LocalRecordingClient.LOCAL_RECORDING_CLIENT_MIN_VERSION_CODE} is required, but found a lower version") + return } Log.d(TAG, "ActivityCompat: ${ActivityCompat.checkSelfPermission(context, Manifest.permission.ACTIVITY_RECOGNITION)}") if (ActivityCompat.checkSelfPermission(context, Manifest.permission.ACTIVITY_RECOGNITION) != PackageManager.PERMISSION_GRANTED) { result.error("2", "Permissions have not been requested", Exception()) + return } Log.d(TAG, "localRecordingClient:") localRecordingClient.subscribe(LocalDataType.TYPE_STEP_COUNT_DELTA)