{"id":19947018,"url":"https://github.com/ko-devhong/react-native-sensor-step","last_synced_at":"2026-04-12T10:32:55.904Z","repository":{"id":57339908,"uuid":"428175844","full_name":"ko-devHong/react-native-sensor-step","owner":"ko-devHong","description":null,"archived":false,"fork":false,"pushed_at":"2021-12-08T14:37:29.000Z","size":225,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-23T13:52:02.270Z","etag":null,"topics":["react","react-native","react-native-manager","react-native-sensor","react-native-sensor-step","react-native-sensors","react-native-step","sensor","step"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ko-devHong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-15T08:10:55.000Z","updated_at":"2024-01-14T16:56:48.000Z","dependencies_parsed_at":"2022-08-24T14:57:04.406Z","dependency_job_id":null,"html_url":"https://github.com/ko-devHong/react-native-sensor-step","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ko-devHong/react-native-sensor-step","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ko-devHong%2Freact-native-sensor-step","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ko-devHong%2Freact-native-sensor-step/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ko-devHong%2Freact-native-sensor-step/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ko-devHong%2Freact-native-sensor-step/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ko-devHong","download_url":"https://codeload.github.com/ko-devHong/react-native-sensor-step/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ko-devHong%2Freact-native-sensor-step/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270702562,"owners_count":24630877,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["react","react-native","react-native-manager","react-native-sensor","react-native-sensor-step","react-native-sensors","react-native-step","sensor","step"],"created_at":"2024-11-13T00:33:55.969Z","updated_at":"2025-12-30T21:45:49.319Z","avatar_url":"https://github.com/ko-devHong.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-sensor-step\n\n## Getting started\n\n`$ npm install react-native-sensor-step --save`\n\n### Automatic installation (Android only)\n\n- React Native 0.60+\n\n### React Native \u003c= 0.59\n\n`$ react-native link react-native-sensor-step`\n\n---\n\n## SensorType\n\n| Type     |                                Description |\n| :------- | -----------------------------------------: |\n| COUNTER  |  [TYPE_STEP_COUNTER][android-sensors-type] |\n| DETECTOR | [TYPE_STEP_DETECTOR][android-sensors-type] |\n\n---\n\n| Method                  |                                                                                                                                                                      Description |\n| :---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |\n| requestSensorPermission | Note: To allow an app to use this sensor on a device running Android 10 (API level 29) or higher, you must declare [ACTIVITY_RECOGNITION][android-sensor-permission] privileges. |\n| checkSensorPermission   |                                                                                                              [ACTIVITY_RECOGNITION][android-sensor-permission] Permission check. |\n| start                   |                                                                                                                                            Number of steps Event Listener, start |\n| stop                    |                                                                                                                                             Number of steps Event Listener, stop |\n\n---\n\n## Usage\n\n```javascript\nimport React, { useEffect, useState } from \"react\";\nimport { DeviceEventEmitter, Text, View } from \"react-native\";\nimport RNSensorStep, { SensorType } from \"react-native-sensor-step\";\n\nconst App = () =\u003e {\n  const [stepCount, setStepCount] = useState(0);\n\n  useEffect(() =\u003e {\n    // you select sensor type COUNTER or DETECTOR\n    // you set delay millisecond\n    RNSensorStep.start(1000, SensorType.COUNTER);\n    DeviceEventEmitter.addListener(\"StepCounter\", async (data) =\u003e {\n      setStepCount(data.steps);\n    });\n    return () =\u003e {\n      RNSensorStep.stop();\n    };\n  }, []);\n\n  return (\n    \u003cView style={styles.container}\u003e\n      \u003cText\u003e{`stepCount : ${stepCount}`}\u003c/Text\u003e\n    \u003c/View\u003e\n  );\n};\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: \"center\",\n    alignItems: \"center\",\n  },\n});\n\nexport default App;\n```\n\n[android-sensors-type]: https://developer.android.com/guide/topics/sensors/sensors_motion?hl=ko\n[android-sensor-permission]: https://developer.android.com/guide/topics/location/transitions?hl=ko\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fko-devhong%2Freact-native-sensor-step","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fko-devhong%2Freact-native-sensor-step","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fko-devhong%2Freact-native-sensor-step/lists"}