---
description: Every Capacitor sensor plugin covered by use case - fitness tracking, motion games, navigation, adaptive UX, and background work gating.
title: The Complete Guide to Capacitor Device Sensors - Capawesome
image: https://capawesome.io/docs/assets/images/social/blog/capacitor-device-sensors-guide.png
---

<!doctype html> 

[Skip to content ](#the-complete-guide-to-capacitor-device-sensors) 

[🖥️ Introducing the **Capacitor Electron Platform** — build desktop apps for macOS, Windows, and Linux. Free & open source. ](/blog/announcing-the-capacitor-electron-platform/) 

* [ SDKs ](/docs/sdks/)
* [ Formbricks ](/docs/sdks/capacitor/formbricks/)
* [ Geocoder ](/docs/sdks/capacitor/geocoder/)
* [ Google Sign-In ](/docs/sdks/capacitor/google-sign-in/)
* [ Grafana Faro ](/docs/sdks/capacitor/grafana-faro/)
* [ Gyroscope ](/docs/sdks/capacitor/gyroscope/)
* [ Haptics ](/docs/sdks/capacitor/haptics/)
* [ Home Indicator ](/docs/sdks/capacitor/home-indicator/)
* [ In-App Browser ](/docs/sdks/capacitor/in-app-browser/)
* [ Install Referrer ](/docs/sdks/capacitor/install-referrer/)
* [ Intercom ](/docs/sdks/capacitor/intercom/)
* [ Intune ](/docs/sdks/capacitor/intune/)
* [ Keep Awake ](/docs/sdks/capacitor/keep-awake/)
* [ libSQL ](/docs/sdks/capacitor/libsql/)
* [ Light Sensor ](/docs/sdks/capacitor/light-sensor/)
* [ Live Update ](/docs/sdks/capacitor/live-update/)
* [ Localization ](/docs/sdks/capacitor/localization/)
* [ Mail Composer ](/docs/sdks/capacitor/mail-composer/)
* [ Managed Configurations ](/docs/sdks/capacitor/managed-configurations/)
* [ Maps Launcher ](/docs/sdks/capacitor/maps-launcher/)
* [ Media Session ](/docs/sdks/capacitor/media-session/)
* [ ML Kit ](/docs/sdks/capacitor/mlkit/)
* [ Navigation Bar ](/docs/sdks/capacitor/navigation-bar/)
* [ Network ](/docs/sdks/capacitor/network/)
* [ NFC ](/docs/sdks/capacitor/nfc/)
* [ Node.js ](/docs/sdks/capacitor/nodejs/)
* [ OAuth ](/docs/sdks/capacitor/oauth/)
* [ Passkeys ](/docs/sdks/capacitor/passkeys/)
* [ Password Autofill ](/docs/sdks/capacitor/password-autofill/)
* [ PDF Generator ](/docs/sdks/capacitor/pdf-generator/)
* [ PDF Viewer ](/docs/sdks/capacitor/pdf-viewer/)
* [ Pedometer ](/docs/sdks/capacitor/pedometer/)
* [ Permissions ](/docs/sdks/capacitor/permissions/)
* [ Phone Dialer ](/docs/sdks/capacitor/phone-dialer/)
* [ Photo Editor ](/docs/sdks/capacitor/photo-editor/)
* [ Photo Manipulator ](/docs/sdks/capacitor/photo-manipulator/)
* [ PixLive ](/docs/sdks/capacitor/pixlive/)
* [ PostHog ](/docs/sdks/capacitor/posthog/)
* [ Printer ](/docs/sdks/capacitor/printer/)
* [ Privacy Screen ](/docs/sdks/capacitor/privacy-screen/)
* [ Proximity Sensor ](/docs/sdks/capacitor/proximity-sensor/)
* [ Purchases ](/docs/sdks/capacitor/purchases/)
* [ RealtimeKit ](/docs/sdks/capacitor/realtimekit/)
* [ Root Detection ](/docs/sdks/capacitor/root-detection/)
* [ Screen Brightness ](/docs/sdks/capacitor/screen-brightness/)
* [ Screen Orientation ](/docs/sdks/capacitor/screen-orientation/)
* [ Screen Reader ](/docs/sdks/capacitor/screen-reader/)
* [ Screenshot ](/docs/sdks/capacitor/screenshot/)
* [ Secure Preferences ](/docs/sdks/capacitor/secure-preferences/)
* [ Settings Launcher ](/docs/sdks/capacitor/settings-launcher/)
* [ Shake ](/docs/sdks/capacitor/shake/)
* [ Silent Mode ](/docs/sdks/capacitor/silent-mode/)
* [ SIM ](/docs/sdks/capacitor/sim/)
* [ SMS Composer ](/docs/sdks/capacitor/sms-composer/)
* [ Speech Recognition ](/docs/sdks/capacitor/speech-recognition/)
* [ Speech Synthesis ](/docs/sdks/capacitor/speech-synthesis/)
* [ Share Target ](/docs/sdks/capacitor/share-target/)
* [ Square Mobile Payments ](/docs/sdks/capacitor/square-mobile-payments/)
* [ SQLite ](/docs/sdks/capacitor/sqlite/)
* [ Superwall ](/docs/sdks/capacitor/superwall/)
* [ System WebView ](/docs/sdks/capacitor/system-webview/)
* [ Tauri ](/docs/sdks/capacitor/tauri/)
* [ Text Interaction ](/docs/sdks/capacitor/text-interaction/)
* [ Text Zoom ](/docs/sdks/capacitor/text-zoom/)
* [ Thermal State ](/docs/sdks/capacitor/thermal-state/)
* [ Toast ](/docs/sdks/capacitor/toast/)
* [ Torch ](/docs/sdks/capacitor/torch/)
* [ Vault ](/docs/sdks/capacitor/vault/)
* [ Volume ](/docs/sdks/capacitor/volume/)
* [ Wallet ](/docs/sdks/capacitor/wallet/)
* [ Wifi ](/docs/sdks/capacitor/wifi/)
* [ YouTube Player ](/docs/sdks/capacitor/youtube-player/)
* [ Zip ](/docs/sdks/capacitor/zip/)
* [ Cordova ](/docs/sdks/cordova/)
* [ Cloud ](/docs/cloud/)
* [ Integrations ](/docs/cloud/live-updates/integrations/)
* Concepts
* Reference
* [ Troubleshooting ](/docs/cloud/live-updates/troubleshooting/)
* [ FAQ ](/docs/cloud/live-updates/faq/)
* [ Native Builds ](/docs/cloud/native-builds/)
* [ Set Up Environments ](/docs/cloud/native-builds/environments/)
* [ Overwrite Native Configurations ](/docs/cloud/native-builds/native-configurations/)
* [ Auto-Increment Build Numbers ](/docs/cloud/native-builds/auto-incrementing-build-numbers/)
* [ Configure the Web Build Script ](/docs/cloud/native-builds/web-build-script/)
* [ Build from a Monorepo ](/docs/cloud/native-builds/monorepo/)
* [ Use pnpm, Yarn, or bun ](/docs/cloud/native-builds/package-managers/)
* [ Install Private npm Packages ](/docs/cloud/native-builds/npm-private-registry/)
* [ Override the Java Version ](/docs/cloud/native-builds/override-java-version/)
* [ Custom iOS Provisioning Profiles ](/docs/cloud/native-builds/custom-ios-provisioning-profiles/)
* [ Build without Git ](/docs/cloud/native-builds/build-without-git/)
* [ Access Git Behind a Firewall ](/docs/cloud/native-builds/firewall-access/)
* [ Integrations ](/docs/cloud/native-builds/integrations/)
* Reference
* [ Troubleshooting ](/docs/cloud/native-builds/troubleshooting/)
* [ FAQ ](/docs/cloud/native-builds/faq/)
* [ App Store Publishing ](/docs/cloud/app-store-publishing/)
* [ Submit a Build ](/docs/cloud/app-store-publishing/submit-a-build/)
* [ Submit Automatically After a Build ](/docs/cloud/app-store-publishing/submit-automatically/)
* [ Troubleshooting ](/docs/cloud/app-store-publishing/troubleshooting/)
* [ FAQ ](/docs/cloud/app-store-publishing/faq/)
* [ Automations ](/docs/cloud/automations/)
* [ Reference ](/docs/cloud/automations/reference/)
* [ Troubleshooting ](/docs/cloud/automations/troubleshooting/)
* [ FAQ ](/docs/cloud/automations/faq/)
* [ Assist ](/docs/cloud/assist/)
* [ CLI ](/docs/cloud/cli/)
* APIs and SDKs
* [ Webhooks ](/docs/cloud/webhooks/)
* [ Integrations ](/docs/cloud/integrations/)
* Account
* [ Organization ](/docs/cloud/organizations/)
* [ Two-Factor Enforcement ](/docs/cloud/organizations/two-factor-authentication/)
* [ Audit Logs ](/docs/cloud/organizations/audit-logs/)
* [ Billing ](/docs/cloud/organizations/billing/)
* [ License Keys ](/docs/cloud/license-keys/)
* [ AI ](/docs/ai/)
* [ Insiders ](/docs/insiders/)
* [ Billing & Plans ](/docs/insiders/billing-and-plans/)
* [ FAQ ](/docs/insiders/faq/)
* [ License ](https://capawesome.io/legal/eula/)
* [ Support ](/docs/support/)
* [ Contributing ](/docs/contributing/)
* Contributing code
* [ Code of Conduct ](/docs/contributing/code-of-conduct/)
* [ Questions ](https://docs.github.com/en/discussions/collaborating-with-your-community-using-discussions/participating-in-a-discussion#creating-a-discussion)
* [ Blog ](/blog/)
* Categories

* [ Conclusion ](#conclusion)

* Related links

# The Complete Guide to Capacitor Device Sensors[¶](#the-complete-guide-to-capacitor-device-sensors "Permanent link")

Fitness trackers, motion-controlled games, navigation apps, and adaptive UIs all lean on the same thing under the hood: the sensors already built into every Android and iOS phone. Native mobile teams have used these APIs for years; cross-platform and hybrid app developers building with Capacitor, Ionic, or a JavaScript framework often assume that kind of native device access means writing separate Swift and Kotlin code. It doesn't. Capacitor exposes ten hardware sensors as separate, focused plugins instead of one catch-all "sensors" API, so a single TypeScript codebase gets the same motion, environment, and device-state data a fully native app would.

This guide covers all ten — grouped by what you're actually building (fitness tracking, games, navigation, adaptive UX, background work) rather than by sensor name — with a working snippet for each, the real apps that use this category of sensor data, and the platform gaps you'll actually hit.

## Key Takeaways[¶](#key-takeaways "Permanent link")

* Capawesome maintains ten device sensor plugins for Capacitor: [Accelerometer](/docs/sdks/capacitor/accelerometer/), [Gyroscope](/docs/sdks/capacitor/gyroscope/), [Compass](/docs/sdks/capacitor/compass/), [Barometer](/docs/sdks/capacitor/barometer/), [Light Sensor](/docs/sdks/capacitor/light-sensor/), [Pedometer](/docs/sdks/capacitor/pedometer/), [Proximity Sensor](/docs/sdks/capacitor/proximity-sensor/), [Thermal State](/docs/sdks/capacitor/thermal-state/), [Battery](/docs/sdks/capacitor/battery/), and [Shake](/docs/sdks/capacitor/shake/).
* Four of the ten — Accelerometer, Gyroscope, Barometer, and Pedometer — require a permission prompt (`checkPermissions()` / `requestPermissions()`) and the `NSMotionUsageDescription` key on iOS. The other six need no permission at all.
* Light Sensor is Android-only; iOS has no public API for ambient light readings.
* Six plugins have no web implementation: Compass, Barometer, Pedometer, Proximity Sensor, Thermal State, and Shake read hardware that isn't exposed to browsers.
* Accelerometer, Barometer, and Pedometer are part of [Capawesome Insiders](https://capawesome.io/insiders/); the other seven are free.
* Eight of the ten expose an `isAvailable()` check (Thermal State and Battery are the exceptions) — call it before anything else, since not every device has every sensor.

## Fitness & Health Tracking[¶](#fitness-health-tracking "Permanent link")

Step-counting and workout apps have two options, and they're not interchangeable. The [Capacitor Pedometer plugin](/docs/sdks/capacitor/pedometer/) doesn't just expose a raw signal — it returns step count directly on both platforms, plus distance, pace, cadence, and floor count on iOS (Android only reports step count; check `isAvailable()` per feature before relying on the rest), along with historical queries for a specific time range:

`[](#%5F%5Fcodelineno-0-1)import { Pedometer } from '@capawesome-team/capacitor-pedometer';
[](#%5F%5Fcodelineno-0-2)
[](#%5F%5Fcodelineno-0-3)const getTodaysSteps = async () => {
[](#%5F%5Fcodelineno-0-4)  const { stepCounting } = await Pedometer.isAvailable();
[](#%5F%5Fcodelineno-0-5)  if (!stepCounting) return null;
[](#%5F%5Fcodelineno-0-6)
[](#%5F%5Fcodelineno-0-7)  const startOfDay = new Date(new Date().setHours(0, 0, 0, 0)).getTime();
[](#%5F%5Fcodelineno-0-8)  const { measurement } = await Pedometer.getMeasurement({
[](#%5F%5Fcodelineno-0-9)    start: startOfDay,
[](#%5F%5Fcodelineno-0-10)    end: Date.now(),
[](#%5F%5Fcodelineno-0-11)  });
[](#%5F%5Fcodelineno-0-12)  return measurement.numberOfSteps;
[](#%5F%5Fcodelineno-0-13)};
`

The [Capacitor Accelerometer plugin](/docs/sdks/capacitor/accelerometer/) is the complementary tool, not a replacement: it streams raw x/y/z acceleration in G's, which is what you reach for when you need to distinguish activity types (walking versus cycling versus stationary) rather than just a step total.

`[](#%5F%5Fcodelineno-1-1)import { Accelerometer } from '@capawesome-team/capacitor-accelerometer';
[](#%5F%5Fcodelineno-1-2)
[](#%5F%5Fcodelineno-1-3)const startTracking = async () => {
[](#%5F%5Fcodelineno-1-4)  await Accelerometer.checkPermissions();
[](#%5F%5Fcodelineno-1-5)  await Accelerometer.requestPermissions();
[](#%5F%5Fcodelineno-1-6)  await Accelerometer.addListener('measurement', (event) => {
[](#%5F%5Fcodelineno-1-7)    console.log(event.x, event.y, event.z);
[](#%5F%5Fcodelineno-1-8)  });
[](#%5F%5Fcodelineno-1-9)  await Accelerometer.startMeasurementUpdates();
[](#%5F%5Fcodelineno-1-10)};
`

Fitness trackers, running apps, and step-counting widgets are the typical apps here — most reach for the Pedometer first and only bring in the Accelerometer when they need to classify the activity itself. [MyBodyTutor](/blog/showcase-mybodytutor/), a weight-loss and nutrition coaching app, is a real example of a health-focused app built with Capacitor, and cross-platform fitness apps have a long track record beyond it: [Sworkit](https://ionic.io/resources/case-studies/sworkit), an instructional workout app built with Ionic and Cordova, grew past 2.5 million monthly active users and cut its development costs in half by shipping one codebase instead of separate native teams — a case study from before Capacitor existed, but proof that this category of app doesn't need a fully native codebase to succeed.

If your fitness app also talks to external hardware, like a chest strap or smartwatch, that's a different plugin entirely — see [How to Build a Heart Rate Monitor with Capacitor](/blog/how-to-build-a-heart-rate-monitor-with-capacitor/) for the Bluetooth Low Energy side of things.

## Games & Motion-Based Interaction[¶](#games-motion-based-interaction "Permanent link")

Tilt controls and shake gestures come from three plugins working alone or together. The [Capacitor Gyroscope plugin](/docs/sdks/capacitor/gyroscope/) reports rotation rate along the x, y, and z axes in radians per second — paired with the Accelerometer above, it's the standard input for tilt-to-steer game mechanics and AR features that need to track both acceleration and rotation.

`[](#%5F%5Fcodelineno-2-1)import { Gyroscope } from '@capawesome/capacitor-gyroscope';
[](#%5F%5Fcodelineno-2-2)
[](#%5F%5Fcodelineno-2-3)const startRotationTracking = async () => {
[](#%5F%5Fcodelineno-2-4)  await Gyroscope.checkPermissions();
[](#%5F%5Fcodelineno-2-5)  await Gyroscope.requestPermissions();
[](#%5F%5Fcodelineno-2-6)  await Gyroscope.addListener('measurement', (event) => {
[](#%5F%5Fcodelineno-2-7)    console.log(event.x, event.y, event.z);
[](#%5F%5Fcodelineno-2-8)  });
[](#%5F%5Fcodelineno-2-9)  await Gyroscope.startMeasurementUpdates();
[](#%5F%5Fcodelineno-2-10)};
`

The [Capacitor Shake plugin](/docs/sdks/capacitor/shake/) is a narrower tool for a single gesture — shake-to-reroll, shake-to-undo, shake-to-report-a-bug — and it only keeps the underlying sensor active while your app is actively watching, which makes it the better choice than the raw Accelerometer whenever a shake gesture is all you need:

`[](#%5F%5Fcodelineno-3-1)import { Shake } from '@capawesome/capacitor-shake';
[](#%5F%5Fcodelineno-3-2)
[](#%5F%5Fcodelineno-3-3)const watchForShake = async () => {
[](#%5F%5Fcodelineno-3-4)  await Shake.addListener('shake', () => {
[](#%5F%5Fcodelineno-3-5)    console.log('Shake detected');
[](#%5F%5Fcodelineno-3-6)  });
[](#%5F%5Fcodelineno-3-7)  await Shake.startWatching({ sensitivity: 'medium' });
[](#%5F%5Fcodelineno-3-8)};
`

Mobile games with tilt or motion controls, AR apps that need real-world orientation, and utility apps with a shake-to-undo gesture are the usual homes for these three. Tilt-to-steer controls are a standard alternative control scheme in mobile racing games like **Mario Kart Tour** and **Asphalt 9**; **Pokémon GO** is the best-known example of an AR app that reads device orientation to keep its overlay aligned with the real world as you move the phone.

## Navigation, Orientation & Outdoor Use[¶](#navigation-orientation-outdoor-use "Permanent link")

The [Capacitor Compass plugin](/docs/sdks/capacitor/compass/) reads the device's heading, including true (geographic) north on iOS, no permission required:

`[](#%5F%5Fcodelineno-4-1)import { Compass } from '@capawesome/capacitor-compass';
[](#%5F%5Fcodelineno-4-2)
[](#%5F%5Fcodelineno-4-3)const watchHeading = async () => {
[](#%5F%5Fcodelineno-4-4)  await Compass.addListener('headingChange', (event) => {
[](#%5F%5Fcodelineno-4-5)    console.log(event.magneticHeading);
[](#%5F%5Fcodelineno-4-6)  });
[](#%5F%5Fcodelineno-4-7)  await Compass.startHeadingUpdates();
[](#%5F%5Fcodelineno-4-8)};
`

The [Capacitor Barometer plugin](/docs/sdks/capacitor/barometer/) reads static air pressure in hectopascals plus a relative altitude reading, each with a timestamp:

`[](#%5F%5Fcodelineno-5-1)import { Barometer } from '@capawesome-team/capacitor-barometer';
[](#%5F%5Fcodelineno-5-2)
[](#%5F%5Fcodelineno-5-3)const startAltitudeTracking = async () => {
[](#%5F%5Fcodelineno-5-4)  await Barometer.checkPermissions();
[](#%5F%5Fcodelineno-5-5)  await Barometer.requestPermissions();
[](#%5F%5Fcodelineno-5-6)  await Barometer.addListener('measurement', (event) => {
[](#%5F%5Fcodelineno-5-7)    console.log(event.pressure, event.relativeAltitude);
[](#%5F%5Fcodelineno-5-8)  });
[](#%5F%5Fcodelineno-5-9)  await Barometer.startMeasurementUpdates();
[](#%5F%5Fcodelineno-5-10)};
`

Navigation and wayfinding apps lean on Compass for heading; hiking, running, and outdoor GPS apps use Barometer because pressure-based altitude change registers faster than a GPS fix does, useful for detecting a climb or descent between fixes. **Google Maps** and **Apple Maps** are the most widely used examples of a compass-driven direction indicator; **AllTrails** and **Strava** are well-known outdoor and running apps that surface elevation data alongside GPS. If you want a deeper look at the Barometer API specifically, see [Exploring the Capacitor Barometer API](/blog/exploring-the-capacitor-barometer-api/).

## Adaptive UX: Brightness, Theme & Call Handling[¶](#adaptive-ux-brightness-theme-call-handling "Permanent link")

The [Capacitor Light Sensor plugin](/docs/sdks/capacitor/light-sensor/) reads ambient illuminance in lux — **Android only**, since iOS has no public API for ambient light:

`[](#%5F%5Fcodelineno-6-1)import { LightSensor } from '@capawesome/capacitor-light-sensor';
[](#%5F%5Fcodelineno-6-2)
[](#%5F%5Fcodelineno-6-3)const watchAmbientLight = async () => {
[](#%5F%5Fcodelineno-6-4)  const { available } = await LightSensor.isAvailable();
[](#%5F%5Fcodelineno-6-5)  if (!available) return;
[](#%5F%5Fcodelineno-6-6)  await LightSensor.addListener('measurement', (event) => {
[](#%5F%5Fcodelineno-6-7)    console.log(event.illuminance);
[](#%5F%5Fcodelineno-6-8)  });
[](#%5F%5Fcodelineno-6-9)  await LightSensor.startMeasurementUpdates();
[](#%5F%5Fcodelineno-6-10)};
`

The [Capacitor Proximity Sensor plugin](/docs/sdks/capacitor/proximity-sensor/) detects whether an object — typically the user's ear — is close to the screen:

`[](#%5F%5Fcodelineno-7-1)import { ProximitySensor } from '@capawesome/capacitor-proximity-sensor';
[](#%5F%5Fcodelineno-7-2)
[](#%5F%5Fcodelineno-7-3)const watchProximity = async () => {
[](#%5F%5Fcodelineno-7-4)  await ProximitySensor.addListener('measurement', (event) => {
[](#%5F%5Fcodelineno-7-5)    console.log(event.near);
[](#%5F%5Fcodelineno-7-6)  });
[](#%5F%5Fcodelineno-7-7)  await ProximitySensor.startMeasurementUpdates();
[](#%5F%5Fcodelineno-7-8)};
`

E-readers and media apps use Light Sensor to switch to a dark theme or dim the screen as the room darkens; calling and video-conferencing apps use Proximity Sensor to blank the screen mid-call so a cheek doesn't trigger touch events. The **Kindle** and **Apple Books** apps are widely known for adapting brightness and theme to ambient light; the phone's own native **Phone** and calling apps like **WhatsApp** publicly document turning the screen off during a call via the proximity sensor. These are examples of the pattern in well-known native apps, not Capacitor apps themselves.

## Background Work & Device Health Gating[¶](#background-work-device-health-gating "Permanent link")

The [Capacitor Battery plugin](/docs/sdks/capacitor/battery/) reads battery level, charging state, and low power mode, with change events for all three — and it's the only plugin in this group with web support:

`[](#%5F%5Fcodelineno-8-1)import { Battery } from '@capawesome/capacitor-battery';
[](#%5F%5Fcodelineno-8-2)
[](#%5F%5Fcodelineno-8-3)const checkBattery = async () => {
[](#%5F%5Fcodelineno-8-4)  const level = await Battery.getBatteryLevel();
[](#%5F%5Fcodelineno-8-5)  const state = await Battery.getBatteryState();
[](#%5F%5Fcodelineno-8-6)  console.log(level.level, state.state);
[](#%5F%5Fcodelineno-8-7)};
`

The [Capacitor Thermal State plugin](/docs/sdks/capacitor/thermal-state/) reads the device's current thermal level and notifies you when it changes:

`[](#%5F%5Fcodelineno-9-1)import { ThermalState } from '@capawesome/capacitor-thermal-state';
[](#%5F%5Fcodelineno-9-2)
[](#%5F%5Fcodelineno-9-3)const watchThermalState = async () => {
[](#%5F%5Fcodelineno-9-4)  const result = await ThermalState.getThermalState();
[](#%5F%5Fcodelineno-9-5)  console.log(result.state);
[](#%5F%5Fcodelineno-9-6)  await ThermalState.addListener('thermalStateChange', (event) => {
[](#%5F%5Fcodelineno-9-7)    console.log(event.state);
[](#%5F%5Fcodelineno-9-8)  });
[](#%5F%5Fcodelineno-9-9)};
`

Apps doing heavy background work — video processing, on-device ML inference, large file syncs — check both before starting a job, deferring non-urgent work when the battery is low or the device is already running hot, rather than being the reason the OS throttles the CPU mid-task. Apple's own **Camera** app is a public example of thermal gating: recording high-resolution video for too long can trigger the familiar "iPhone needs to cool down" warning and throttle or pause recording. Cloud backup apps like **Google Photos** are well known for deferring large uploads until the device is on Wi-Fi and, on some platforms, charging — the same device-state-aware pattern applied to network and battery instead of heat.

## Practical Considerations[¶](#practical-considerations "Permanent link")

**Permissions.** Four of the ten plugins — Accelerometer, Gyroscope, Barometer, and Pedometer — require `checkPermissions()` and `requestPermissions()`, plus the `NSMotionUsageDescription` key in your iOS `Info.plist`. The other six (Compass, Light Sensor, Proximity Sensor, Thermal State, Battery, Shake) need no permission at all.

**Platform gaps.** Light Sensor is Android-only. Compass, Barometer, Pedometer, Proximity Sensor, Thermal State, and Shake have no web implementation — they read hardware that isn't exposed to browsers. Accelerometer, Gyroscope, and Battery are the only three that work across Android, iOS, and the web.

**Insiders plugins.** Accelerometer, Barometer, and Pedometer are part of [Capawesome Insiders](https://capawesome.io/insiders/) and require a membership to install; the other seven are free.

**Testing.** Eight of the ten plugins expose an `isAvailable()` method (Thermal State and Battery are the exceptions, since virtually every device reports those two) — call it before requesting permissions or starting updates, since simulators and emulators don't always expose every sensor, and not every physical device has a barometer or an ambient light sensor.

**Unsubscribe when you're done.** Accelerometer, Gyroscope, Barometer, and Light Sensor readings are continuous streams. Leaving a listener registered after a screen unmounts keeps the underlying hardware sensor active and drains battery for no benefit — call the matching `stop*Updates()` method when your feature is no longer in use.

## FAQ[¶](#faq "Permanent link")

### Which Capacitor sensor plugins require a permission prompt?[¶](#which-capacitor-sensor-plugins-require-a-permission-prompt "Permanent link")

Accelerometer, Gyroscope, Barometer, and Pedometer all require `checkPermissions()` / `requestPermissions()`, plus the `NSMotionUsageDescription` key in your iOS `Info.plist`. Compass, Light Sensor, Proximity Sensor, Thermal State, Battery, and Shake need no permission.

### Why is the Light Sensor plugin Android-only?[¶](#why-is-the-light-sensor-plugin-android-only "Permanent link")

iOS has no public API for ambient light readings, so there's no path to an iOS implementation regardless of the plugin itself — the restriction comes from the platform, not from Capawesome.

### Do these sensor plugins work in a Capacitor web build?[¶](#do-these-sensor-plugins-work-in-a-capacitor-web-build "Permanent link")

Only three do: Accelerometer, Gyroscope, and Battery. The other seven read native hardware that browsers don't expose, so plan for a fallback UI on web if your app targets it.

### What's the difference between the Accelerometer and Pedometer plugins for step tracking?[¶](#whats-the-difference-between-the-accelerometer-and-pedometer-plugins-for-step-tracking "Permanent link")

Pedometer returns step count, distance, pace, cadence, and floor count directly — it's the plugin to use for a step counter. Accelerometer returns raw x/y/z acceleration only; reach for it when you need to classify the type of motion itself (walking versus cycling, for example), not just count steps.

### Do I need Capawesome Insiders to use these plugins?[¶](#do-i-need-capawesome-insiders-to-use-these-plugins "Permanent link")

For three of them, yes: Accelerometer, Barometer, and Pedometer require an Insiders membership. The other seven — Gyroscope, Compass, Light Sensor, Proximity Sensor, Thermal State, Battery, and Shake — are free.

## Conclusion[¶](#conclusion "Permanent link")

Ten plugins, five use cases, and a permission/platform matrix that's smaller than it looks once you group them this way. Start with Pedometer and Accelerometer for fitness tracking, Gyroscope and Shake for motion-based interaction, and check Battery and Thermal State before any background job that could get throttled.

If you have questions about combining any of these, [create a discussion](https://github.com/capawesome-team/capacitor-plugins) in the GitHub repository or join the [Capawesome Discord server](https://discord.gg/VCXxSVjefW), and subscribe to the [Capawesome newsletter](https://capawesome.io/newsletter/) to catch the next guide like this one.

July 16, 2026 

Back to top

```json
{
      "@context": "https://schema.org",
      "@type": "BlogPosting",
      "headline": "The Complete Guide to Capacitor Device Sensors",
      "description": "Every Capacitor sensor plugin covered by use case - fitness tracking, motion games, navigation, adaptive UX, and background work gating.",
      "image": "https://capawesome.io/assets/banners/cloud-build-and-deploy-capacitor-apps.png",
      "datePublished": "2026-07-16T00:00:00+00:00",
      "dateModified": "2026-07-16T00:00:00+00:00",
      "author": [
        {
          "@type": "Person",
          "name": "Dayana Jabif",
          "url": "https://github.com/djabif"
        }
      ],
      "publisher": {
        "@type": "Organization",
        "name": "Capawesome",
        "url": "https://capawesome.io",
        "logo": {
          "@type": "ImageObject",
          "url": "https://capawesome.io/assets/images/logo.svg"
        }
      },
      "articleSection": "Capacitor",
      "keywords": ["Capacitor", "Guides", "SDKs"],
      "isPartOf": {
        "@type": "Blog",
        "@id": "https://capawesome.io/blog/#blog"
      },
      "mainEntityOfPage": "https://capawesome.io/blog/capacitor-device-sensors-guide/",
      "url": "https://capawesome.io/blog/capacitor-device-sensors-guide/"
    }
{
      "@context": "https://schema.org",
      "@type": "BreadcrumbList",
      "itemListElement": [
        {
          "@type": "ListItem",
          "position": 1,
          "name": "Home",
          "item": "https://capawesome.io/"
        },
        {
          "@type": "ListItem",
          "position": 2,
          "name": "Blog",
          "item": "https://capawesome.io/blog/"
        },
        {
          "@type": "ListItem",
          "position": 3,
          "name": "The Complete Guide to Capacitor Device Sensors",
          "item": "https://capawesome.io/blog/capacitor-device-sensors-guide/"
        }
      ]
    }
{"@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [{"@type": "Question", "name": "Which Capacitor sensor plugins require a permission prompt?", "acceptedAnswer": {"@type": "Answer", "text": "Accelerometer, Gyroscope, Barometer, and Pedometer all require checkPermissions() / requestPermissions(), plus the NSMotionUsageDescription key in your iOS Info.plist. Compass, Light Sensor, Proximity Sensor, Thermal State, Battery, and Shake need no permission."}}, {"@type": "Question", "name": "Why is the Light Sensor plugin Android-only?", "acceptedAnswer": {"@type": "Answer", "text": "iOS has no public API for ambient light readings, so there's no path to an iOS implementation regardless of the plugin itself — the restriction comes from the platform, not from Capawesome."}}, {"@type": "Question", "name": "Do these sensor plugins work in a Capacitor web build?", "acceptedAnswer": {"@type": "Answer", "text": "Only three do: Accelerometer, Gyroscope, and Battery. The other seven read native hardware that browsers don't expose, so plan for a fallback UI on web if your app targets it."}}, {"@type": "Question", "name": "What's the difference between the Accelerometer and Pedometer plugins for step tracking?", "acceptedAnswer": {"@type": "Answer", "text": "Pedometer returns step count, distance, pace, cadence, and floor count directly — it's the plugin to use for a step counter. Accelerometer returns raw x/y/z acceleration only; reach for it when you need to classify the type of motion itself (walking versus cycling, for example), not just count steps."}}, {"@type": "Question", "name": "Do I need Capawesome Insiders to use these plugins?", "acceptedAnswer": {"@type": "Answer", "text": "For three of them, yes: Accelerometer, Barometer, and Pedometer require an Insiders membership. The other seven — Gyroscope, Compass, Light Sensor, Proximity Sensor, Thermal State, Battery, and Shake — are free."}}], "url": "https://capawesome.io/blog/capacitor-device-sensors-guide/"}
```
