Is there a way to create a pedometer?

I am wanting my android game to have a step counter.

Is there a way to do this? And, if so, is there a tutorial available?

Thank you so much for your help in advance.

Edit: specifically asking about making the sensor in an Android phone effect a variable in the game.

  • Sprite player
  • Variable feets_traveled
  • Sprite start_point
  • Sprite end_point

Set a variable to save the feets traveled then check if player is at start_point and set variable feets_traveled = 0, compare the player distance to the end_pooint

Then you can for add some value every x pixels traveled. Suppose you want the player travel 1 feet every 10 pixels, so set feets_traveled +=1

I apologize. I wasn’t very clear.

I mean to make the software detect a sensor for Android to act as a pedometer.

You would need to find the algorithm used to detect steps, probably available somewhere on Google, but I don’t think it will work if the phone is in standby (screen off in the pocket). :confused:

I have to wonder then, does anyone know of a way to import data from another app?

Specifically, to import data from a pedometer app.

If your app is able to export data to a json file, you might be able to do it.

Eu também tenho essa dúvida , eu pesquisei por todo que canto e não achei , se alguém me enviar um script da gdevelop seria de grande ajuda :disappointed_relieved::disappointed::disappointed_relieved::cry: