2

Background

I am new to flutter and need to implement a step counter. I found the pedometer plugin for flutter, but can not get the example code to run. I am using visual studio code and android studio. I get the following error.

Error

E/flutter (11300): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: PlatformException(1, StepDetection not available, StepDetection is not available on this device)

I/flutter (11300): ERROR: StepCount not available

I have added the following line to my androidmanifest as instructed by the documentation:

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

Any ideas why this does not work? Is it not possible to test pedometer apps on an android emulator? I have tested on pixel 2 and pixel 3.

I have an Iphone and i am working on a Windows computer, so i can not test it on a physical device.

Chris Maggiulli
  • 3,375
  • 26
  • 39
H-ward
  • 21
  • 2
  • 1
    I just got an android phone and the code now works. Seems as though the pedometer plugin does not work on emulator. – H-ward Sep 24 '20 at 14:03
  • Pedometer 3.0.0 It works on my Samsung Galaxy S7, but it does not work on my Samsung A02s and on my iOS Simulator – Cedric Dec 02 '21 at 14:43

0 Answers0