From ca84e10616fd5a844f1a5aa0ec5cfec6fec17d46 Mon Sep 17 00:00:00 2001 From: devroo Date: Fri, 15 Mar 2024 18:17:48 +0900 Subject: [PATCH] =?UTF-8?q?Log=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/stepsensor/StepSensorModule.kt | 12 ++++++------ .../com/stepsensor/services/AccelerometerService.kt | 2 +- .../com/stepsensor/services/SensorListenService.kt | 8 ++++---- package.json | 2 +- src/NativeStepSensor.ts | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/android/src/main/java/com/stepsensor/StepSensorModule.kt b/android/src/main/java/com/stepsensor/StepSensorModule.kt index 6c35ed8..7ac2b53 100644 --- a/android/src/main/java/com/stepsensor/StepSensorModule.kt +++ b/android/src/main/java/com/stepsensor/StepSensorModule.kt @@ -83,9 +83,9 @@ class StepSensorModule internal constructor(context: ReactApplicationContext) : */ @ReactMethod override fun isStepSensorSupported(promise: Promise) { - Log.d(TAG_NAME, "hardware_step_counter? $supported") - Log.d(TAG_NAME, "step_counter granted? $stepsOK") - Log.d(TAG_NAME, "accelerometer granted? $accelOK") + // Log.d(TAG_NAME, "hardware_step_counter? $supported") + // Log.d(TAG_NAME, "step_counter granted? $stepsOK") + // Log.d(TAG_NAME, "accelerometer granted? $accelOK") sendDeviceEvent("stepDetected", walkingStatus) promise.resolve( Arguments.createMap().apply { @@ -107,7 +107,7 @@ class StepSensorModule internal constructor(context: ReactApplicationContext) : } else { AccelerometerService(this, sensorManager) } - Log.d(TAG_NAME, "startStepSensorUpdate") + // Log.d(TAG_NAME, "startStepSensorUpdate") stepSensorListener!!.startService() } @@ -117,7 +117,7 @@ class StepSensorModule internal constructor(context: ReactApplicationContext) : */ @ReactMethod override fun stopStepSensorUpdate() { - Log.d(TAG_NAME, "stopStepSensorUpdate") + // Log.d(TAG_NAME, "stopStepSensorUpdate") stepSensorListener!!.stopService() } @@ -159,7 +159,7 @@ class StepSensorModule internal constructor(context: ReactApplicationContext) : .emit("$NAME.$eventType", eventPayload) } catch (e: RuntimeException) { e.message?.let { Log.e(TAG_NAME, it) } - Log.e(TAG_NAME, eventType, e) + // Log.e(TAG_NAME, eventType, e) } } } \ No newline at end of file diff --git a/android/src/main/java/com/stepsensor/services/AccelerometerService.kt b/android/src/main/java/com/stepsensor/services/AccelerometerService.kt index f54cbb5..a3013a4 100644 --- a/android/src/main/java/com/stepsensor/services/AccelerometerService.kt +++ b/android/src/main/java/com/stepsensor/services/AccelerometerService.kt @@ -99,7 +99,7 @@ class AccelerometerService( velocityEstimate > STEP_THRESHOLD && oldVelocityEstimate <= STEP_THRESHOLD && timeNs - lastStepTimeNs > STEP_DELAY_NS if (isWalkingOrRunning) { currentSteps = currentSteps.plus(1) - Log.d(TAG_NAME, "STATUS: $currentSteps steps. TIMESTAMP: $timeNs") + // Log.d(TAG_NAME, "STATUS: $currentSteps steps. TIMESTAMP: $timeNs") lastStepTimeNs = timeNs } oldVelocityEstimate = velocityEstimate diff --git a/android/src/main/java/com/stepsensor/services/SensorListenService.kt b/android/src/main/java/com/stepsensor/services/SensorListenService.kt index 5395147..3be9c18 100644 --- a/android/src/main/java/com/stepsensor/services/SensorListenService.kt +++ b/android/src/main/java/com/stepsensor/services/SensorListenService.kt @@ -168,7 +168,7 @@ abstract class SensorListenService( */ fun startService() { counterModule.sendDeviceEvent("stepsSensorInfo", stepsSensorInfo) - Log.d(TAG_NAME, "SensorManager.stepsSensorInfo: $stepsSensorInfo") + // Log.d(TAG_NAME, "SensorManager.stepsSensorInfo: $stepsSensorInfo") sensorManager.registerListener(this, detectedSensor, samplingPeriodUs) } @@ -179,7 +179,7 @@ abstract class SensorListenService( * @see SensorManager.unregisterListener */ fun stopService() { - Log.d(TAG_NAME, "SensorListenService.stopService") + // Log.d(TAG_NAME, "SensorListenService.stopService") sensorManager.unregisterListener(this) } @@ -238,8 +238,8 @@ abstract class SensorListenService( * `SensorManager.SENSOR_STATUS_*` */ override fun onAccuracyChanged(sensor: Sensor?, accuracy: Int) { - Log.d(TAG_NAME, "onAccuracyChanged.accuracy $accuracy") - Log.d(TAG_NAME, "onAccuracyChanged.sensor: $sensor") + // Log.d(TAG_NAME, "onAccuracyChanged.accuracy $accuracy") + // Log.d(TAG_NAME, "onAccuracyChanged.sensor: $sensor") } /** diff --git a/package.json b/package.json index c564153..66e803c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "react-native-step-sensor", "displayName": "react-native-step-sensor", - "version": "0.0.15", + "version": "0.0.16", "homepage": "https://github.com/devroo/react-native-step-sensor", "author": "devroo", "summary": "It is a multi-platform library that combines CoreMotionSensor from iOS with SensorEventListener from Android.", diff --git a/src/NativeStepSensor.ts b/src/NativeStepSensor.ts index d661073..fc39c11 100644 --- a/src/NativeStepSensor.ts +++ b/src/NativeStepSensor.ts @@ -23,7 +23,7 @@ export type StepSensorData = { }; export const NAME = 'StepSensor'; -export const VERSION = '0.0.15'; +export const VERSION = '0.0.16'; export const eventName = 'StepSensor.stepSensorUpdate'; export interface Spec extends TurboModule {