0

How do I get the amount of steps the user has taken outside of an android application? Preferably using the google fit api to get the steps.

All i know is that the steps would have to be fetched in a Service or a BroadcastReceiver, but i don't know how. Does anyone know of some documentation or code that could help?

If you know a way to accomplish this without google fit that would work to.

The Chef
  • 11
  • 2

1 Answers1

0

I don't think you can take out Android apps out of the equation because Google Fit API is part of Goolge Play Services which is found on Android devices. So to work with Google Fit, you need to develop apps for Android phones. This is found in the Get Started guide of the Google Fit API.

To know about counting steps, check this documentation and a related SO post Android 4.4 Step Detector and Counter talking about counting steps using sensor of the android device (w/o Google Fit).

Community
  • 1
  • 1
ReyAnthonyRenacia
  • 17,219
  • 5
  • 37
  • 56
  • oh damn just relized that my question was kinda weird. What i meant to ask is how to keep getting steps after the application is closed. – The Chef Jan 03 '17 at 12:05