Skip to content

Commit

Permalink
Log 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
devroo committed Mar 15, 2024
1 parent a4b7c2b commit ca84e10
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions android/src/main/java/com/stepsensor/StepSensorModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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()
}

Expand All @@ -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()
}

Expand Down Expand Up @@ -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)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand All @@ -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)
}

Expand Down Expand Up @@ -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")
}

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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.",
Expand Down
2 changes: 1 addition & 1 deletion src/NativeStepSensor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ca84e10

Please sign in to comment.