AndrewDongminYoo / react-native-step-counter

[리액트 네이티브 라이브러리] 사용자의 걸음 수를 계산합니다. Android는 StepCounter (or Accelerometer) 센서 API를, iOS는 CoreMotion CMPedometer 를 사용하여 걸음 수를 측정합니다.
https://andrewdongminyoo.github.io/react-native-step-counter/
MIT License
29 stars 10 forks source link

Type mismatch: inferred type is Sensor? but Sensor was expected #40

Closed Ugur-Atakan closed 6 months ago

Ugur-Atakan commented 8 months ago

React Native Step Counter New Issue

Expected Behavior

Actual Behavior

> Task :dongminyu_react-native-step-counter:compileDebugKotlin FAILED
e: file:///C:/Users/uguratakan/Desktop/Projects/BlokField/blokfield/node_modules/@dongminyu/react-native-step-counter/android/src/main/java/com/stepcounter/services/AccelerometerService.kt:46:43 Type mismatch: inferred type is Sensor? but Sensor was expected
e: file:///C:/Users/uguratakan/Desktop/Projects/BlokField/blokfield/node_modules/@dongminyu/react-native-step-counter/android/src/main/java/com/stepcounter/services/StepCounterService.kt:40:43 Type mismatch: inferred type is Sensor? but Sensor was expected

Steps to Reproduce the Problem

  1. yarn create react-native-app my-app
  2. yarn add @dongminyu/react-native-step-counter
  3. npx react-native run-*android*

Specifications

dkel3slek commented 6 months ago

같은 현상이 있습니다.

Ugur-Atakan commented 6 months ago

You can check my fork. I fixed this problem

dkel3slek commented 6 months ago

Thank you for your kind reply.

AndrewDongminYoo commented 6 months ago

@Ugur-Atakan I really appreciate the interest and participation you've shown in this package. I know it's late, but I've seen the issue. could you please send me a pull request from your fork if you don't mind?

AndrewDongminYoo commented 6 months ago

Is fixing by #42