{"_id":"@dreiver1/capacitor-step-counter","_rev":"3-c87d18dc7aad191ce846fc3dd3e07e1f","name":"@dreiver1/capacitor-step-counter","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@dreiver1/capacitor-step-counter","version":"0.0.1","keywords":["capacitor","capacitor-plugin","step-counter","pedometer","fitness","android","ios"],"author":{"name":"David Nascimento"},"license":"MIT","_id":"@dreiver1/capacitor-step-counter@0.0.1","maintainers":[{"name":"david-nascimento","email":"viniciosdavid1@gmail.com"}],"homepage":"https://github.com/dreiver1/capacitor-step-counter#readme","bugs":{"url":"https://github.com/dreiver1/capacitor-step-counter/issues"},"dist":{"shasum":"6bd85b0b4169dfa157d9e95259636c6cdba353a8","tarball":"https://registry.npmjs.org/@dreiver1/capacitor-step-counter/-/capacitor-step-counter-0.0.1.tgz","fileCount":26,"integrity":"sha512-dKmmHVUFGSP1Q9t1++GV3F8C7p77TfRzZVoUh0PUv21NXKLsA+p5P0zC8VTEUkZgpf7p89BtQYNhvTz8mIlMGg==","signatures":[{"sig":"MEYCIQD4t+K/gR3aCqpmsJeNoFGmXlYCiGCTyyxDAM9O/mpCqAIhANOrmPR8ZeuolDRhrHG1kwqeptohhvQ1s8rJFxVwUjqw","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25649},"main":"dist/plugin.cjs.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","gitHead":"5f2659a07d64d61aa21eb0757fff5438730be27b","scripts":{"fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","docgen":"docgen --api StepCounterPlugin --output-readme README.md --output-json dist/docs.json","eslint":"eslint . --ext ts","verify":"npm run verify:ios && npm run verify:android && npm run verify:web","prettier":"prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java","swiftlint":"node-swiftlint","verify:ios":"xcodebuild -scheme StepCounter -destination generic/platform=iOS","verify:web":"npm run build","prepublishOnly":"npm run build","verify:android":"cd android && ./gradlew clean build test && cd .."},"_npmUser":{"name":"david-nascimento","email":"viniciosdavid1@gmail.com"},"prettier":"@ionic/prettier-config","capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"swiftlint":"@ionic/swiftlint-config","repository":{"url":"git+https://github.com/dreiver1/capacitor-step-counter.git","type":"git"},"_npmVersion":"11.5.2","description":"A Capacitor plugin that provides access to the device step counter sensor on Android and iOS, with a web fallback.","directories":{},"_nodeVersion":"24.7.0","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.57.1","rimraf":"^6.1.0","rollup":"^4.53.2","prettier":"^3.6.2","swiftlint":"^2.0.0","typescript":"^5.9.3","@capacitor/ios":"^8.0.0","@capacitor/core":"^8.0.0","@capacitor/docgen":"^0.3.1","@capacitor/android":"^8.0.0","@ionic/eslint-config":"^0.4.0","prettier-plugin-java":"^2.7.7","@ionic/prettier-config":"^4.0.0","@ionic/swiftlint-config":"^2.0.0"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/capacitor-step-counter_0.0.1_1768045507730_0.054933230281354994","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@dreiver1/capacitor-step-counter","version":"0.0.2","keywords":["capacitor","capacitor-plugin","step-counter","pedometer","fitness","android","ios"],"author":{"name":"David Nascimento"},"license":"MIT","_id":"@dreiver1/capacitor-step-counter@0.0.2","maintainers":[{"name":"david-nascimento","email":"viniciosdavid1@gmail.com"}],"homepage":"https://github.com/dreiver1/capacitor-step-counter#readme","bugs":{"url":"https://github.com/dreiver1/capacitor-step-counter/issues"},"dist":{"shasum":"72bd761f312e00f78d52309883f2d290dc5f74f4","tarball":"https://registry.npmjs.org/@dreiver1/capacitor-step-counter/-/capacitor-step-counter-0.0.2.tgz","fileCount":26,"integrity":"sha512-HHAFBY/JYlAMlQQD8bkodlraMwIQ6k5fMXFvtppgPojuToqEi82NsOPhifc5gKixa8va6ly8rkZtUtHANwzpFw==","signatures":[{"sig":"MEYCIQDW8FsJTq18L0fR8B37vuRCIf+FBNEQmMNix0/z0zC+OwIhAJc+uqT5h1j7TNQkvCTGZtUBu/kL6hpMZP2rsSDn+Kn2","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25561},"main":"dist/plugin.cjs.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","gitHead":"a7d061c7b1405e78611ce3e8a6c66b525d83e779","scripts":{"fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","docgen":"docgen --api StepCounterPlugin --output-readme README.md --output-json dist/docs.json","eslint":"eslint . --ext ts","verify":"npm run verify:ios && npm run verify:android && npm run verify:web","prettier":"prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java","swiftlint":"node-swiftlint","verify:ios":"xcodebuild -scheme StepCounter -destination generic/platform=iOS","verify:web":"npm run build","prepublishOnly":"npm run build","verify:android":"cd android && ./gradlew clean build test && cd .."},"_npmUser":{"name":"david-nascimento","email":"viniciosdavid1@gmail.com"},"prettier":"@ionic/prettier-config","capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"swiftlint":"@ionic/swiftlint-config","repository":{"url":"git+https://github.com/dreiver1/capacitor-step-counter.git","type":"git"},"_npmVersion":"11.5.2","description":"A Capacitor plugin that provides access to the device step counter sensor on Android and iOS, with a web fallback.","directories":{},"_nodeVersion":"24.7.0","dependencies":{"step-counter":"github:dreiver1/capacitor-step-counter"},"eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.57.1","rimraf":"^6.1.0","rollup":"^4.53.2","prettier":"^3.6.2","swiftlint":"^2.0.0","typescript":"^5.9.3","@capacitor/ios":"^8.0.0","@capacitor/core":"^8.0.0","@capacitor/docgen":"^0.3.1","@capacitor/android":"^8.0.0","@ionic/eslint-config":"^0.4.0","prettier-plugin-java":"^2.7.7","@ionic/prettier-config":"^4.0.0","@ionic/swiftlint-config":"^2.0.0"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/capacitor-step-counter_0.0.2_1768160194301_0.33836830135123286","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@dreiver1/capacitor-step-counter","version":"0.0.3","description":"A Capacitor plugin that provides access to the device step counter sensor on Android and iOS, with a web fallback.","main":"dist/plugin.cjs.js","module":"dist/esm/index.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","author":{"name":"David Nascimento"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/dreiver1/capacitor-step-counter.git"},"bugs":{"url":"https://github.com/dreiver1/capacitor-step-counter/issues"},"keywords":["capacitor","capacitor-plugin","step-counter","pedometer","fitness","android","ios"],"scripts":{"verify":"npm run verify:ios && npm run verify:android && npm run verify:web","verify:ios":"xcodebuild -scheme StepCounter -destination generic/platform=iOS","verify:android":"cd android && ./gradlew clean build test && cd ..","verify:web":"npm run build","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","eslint":"eslint . --ext ts","prettier":"prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java","swiftlint":"node-swiftlint","docgen":"docgen --api StepCounterPlugin --output-readme README.md --output-json dist/docs.json","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","prepublishOnly":"npm run build"},"devDependencies":{"@capacitor/android":"^8.0.0","@capacitor/core":"^8.0.0","@capacitor/docgen":"^0.3.1","@capacitor/ios":"^8.0.0","@ionic/eslint-config":"^0.4.0","@ionic/prettier-config":"^4.0.0","@ionic/swiftlint-config":"^2.0.0","eslint":"^8.57.1","prettier":"^3.6.2","prettier-plugin-java":"^2.7.7","rimraf":"^6.1.0","rollup":"^4.53.2","swiftlint":"^2.0.0","typescript":"^5.9.3"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"prettier":"@ionic/prettier-config","swiftlint":"@ionic/swiftlint-config","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"dependencies":{"step-counter":"github:dreiver1/capacitor-step-counter"},"_id":"@dreiver1/capacitor-step-counter@0.0.3","gitHead":"55dff793b1a4a51df304b60001924a485fde98fc","homepage":"https://github.com/dreiver1/capacitor-step-counter#readme","_nodeVersion":"24.7.0","_npmVersion":"11.5.2","dist":{"integrity":"sha512-UrXCMvCY0Q+c+Wl0P3Y7AXPaUisvJb/SYFwokrX2Kxb2EBlFcemWXq/mNdRdzHHBlWd1YxFAWFujccFfdqTQxQ==","shasum":"4d708fd13dfa55d1e00e4ab2aa2aa981772b4605","tarball":"https://registry.npmjs.org/@dreiver1/capacitor-step-counter/-/capacitor-step-counter-0.0.3.tgz","fileCount":26,"unpackedSize":26564,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDB37/q1BS1YHyb2H9kRPgIzpHpm8mjAlHvfxge8fiE/QIgD04gVnU6Kr+t6e5KZwG+5JcJ4xPKWwh8Jh/YagxeH74="}]},"_npmUser":{"name":"david-nascimento","email":"viniciosdavid1@gmail.com"},"directories":{},"maintainers":[{"name":"david-nascimento","email":"viniciosdavid1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/capacitor-step-counter_0.0.3_1768390648950_0.6329562585339041"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-10T11:45:07.679Z","modified":"2026-01-14T11:37:29.228Z","0.0.1":"2026-01-10T11:45:07.890Z","0.0.2":"2026-01-11T19:36:34.470Z","0.0.3":"2026-01-14T11:37:29.090Z"},"bugs":{"url":"https://github.com/dreiver1/capacitor-step-counter/issues"},"author":{"name":"David Nascimento"},"license":"MIT","homepage":"https://github.com/dreiver1/capacitor-step-counter#readme","keywords":["capacitor","capacitor-plugin","step-counter","pedometer","fitness","android","ios"],"repository":{"type":"git","url":"git+https://github.com/dreiver1/capacitor-step-counter.git"},"description":"A Capacitor plugin that provides access to the device step counter sensor on Android and iOS, with a web fallback.","maintainers":[{"name":"david-nascimento","email":"viniciosdavid1@gmail.com"}],"readme":"# step-counter\n\nA Capacitor plugin that provides access to the **Android Step Counter sensor**\n(`TYPE_STEP_COUNTER`), allowing apps to read step count data and receive real-time\nstep updates. Includes a web fallback for non-Android platforms.\n\n---\n\n## ⚠️ Platform Support\n\n| Platform | Supported |\n|---------|-----------|\n| Android | ✅ Yes |\n| Web     | ⚠️ Fallback (no real sensor) |\n| iOS     | ❌ Not supported |\n\n> This plugin relies on Android’s `TYPE_STEP_COUNTER` sensor, which is **not available on iOS**.\n\n---\n\n## 📦 Installation\n\n```bash\nnpm install step-counter\nnpx cap sync\n\n\n🔐 Android Permissions\n\nOn Android 10 (API 29) and above, this plugin requires the\nACTIVITY_RECOGNITION permission.\n\nThe permission is:\n\nAutomatically requested when calling start()\n\nMandatory for accessing step counter data\n\n🧠 How the Step Counter Works\n\nUses Sensor.TYPE_STEP_COUNTER\n\nThe step count represents total steps since the device last rebooted\n\nThe value cannot be reset programmatically\n\nFor daily or session-based steps, store a baseline value in your app\n\n🚀 API\nstart()\nstart() => Promise<void>\n\n\nStarts listening to the Android step counter sensor.\n\nRequests ACTIVITY_RECOGNITION permission if required\n\nThrows an error if the sensor is not available on the device\n\nstop()\nstop() => Promise<void>\n\n\nStops listening to the step counter sensor.\n\ngetCurrentSteps()\ngetCurrentSteps() => Promise<StepCounterData>\n\n\nReturns the current number of steps since the device last boot.\n\naddListener('step', ...)\naddListener(\n  eventName: 'step',\n  listenerFunc: (data: StepCounterData) => void\n) => Promise<PluginListenerHandle>\n\n\nEmits step updates whenever the system sensor reports a change.\n\nEmits the total accumulated steps since boot\n\nTriggered in real time\n\n🧩 Interfaces\nStepCounterData\nProp\tType\tDescription\nsteps\tnumber\tTotal number of steps since device boot\nPluginListenerHandle\nProp\tType\nremove\t() => Promise<void>\n📝 Example Usage\nimport { StepCounter } from 'step-counter';\n\nawait StepCounter.start();\n\nconst listener = await StepCounter.addListener('step', data => {\n  console.log('Steps:', data.steps);\n});\n\n// Stop listening\nawait StepCounter.stop();\nawait listener.remove();\n\n❗ Notes & Limitations\n\nStep count resets when the device restarts\n\nNot all Android devices include a step counter sensor\n\nThis plugin does not manage background execution\n\nBackground behavior depends on OS and app lifecycle","readmeFilename":"README.md"}