0

I have installed the blank flutter app with ONLY pedometer package :

dependencies:
  pedometer: ^3.0.0

And paste this source, compiled without errors, but in-app :

Step Count not available

I installed other libraries, they work, what's the point?

Flutter doctor:

[✓] Flutter (Channel stable, 3.7.5, on macOS 12.6 21G115 darwin-arm64, locale
    en-RS)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.1)
[✓] VS Code (version 1.76.0)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

Device data:

Samsung Galaxy A10

One UI version
3.1
Android Version
11
Google Play system update
1 April 2021
Krenel version
4.4.17...

Chat GPT things:

The Flutter pedometer package should be compatible with the Samsung Galaxy A10 running One UI 3.1 and Android 11, 
as well as the Google Play system update from April 2021.
Milos N.
  • 4,416
  • 6
  • 18
  • 31
  • Do you have any error ? If yes, which ones ? Also if you tried that on an emulator, that's completely normal that it doesn't work. If you tested that on a real device, please include the error you got if you got any. – BLKKKBVSIK Mar 10 '23 at 00:20

1 Answers1

0

you should add , permissions to use the package,

For android:

For Android 10 and above add the following permission to the Android manifest:

<uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />

For ios:

Add the following entries to your Info.plist file in the Runner xcode project:

<key>NSMotionUsageDescription</key>
<string>This application tracks your steps</string>
<key>UIBackgroundModes</key>
<array>
    <string>processing</string>
</array>
Thusitha Deepal
  • 1,392
  • 12
  • 19