Not able to run flutter pedometer plugin on android emulator

1.1k views Asked by At

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.

0

There are 0 answers