Is Expo Pedometer Supported On Android?
I'm setting up a Pedometer app in React Native using Expo, testing the code on my real Samsung s10 device. I am using the Expo Pedometer documentation However, when I use the Pedom
Solution 1:
Yes, by using Core Motion (iOS) or Google Fit (Android) to get the user's step count. Any Android phone running on a 4.4 (KitKat) operating system or later will connect with Google Fit.
Pedometer unable to query steps, documentation unclear/contradictory.
Solution 2:
I did something nasty as a workaround but it worked I added expo 33 as a legacy npm dependency and use only the pedometer module from there because currently they didn't implemented the pedometer functionality on android on the new Expo unimodules
package.json
"expo": "^35.0.0",
"expo-legacy": "npm:expo@33.0.0",
And use it like this
import {Pedometer} from 'expo-legacy'
Surprisingly compiled and only increased 200kb the apk size
Post a Comment for "Is Expo Pedometer Supported On Android?"