this post was submitted on 06 Sep 2023
8 points (100.0% liked)

Android Development

540 readers
8 users here now

Welcome to the programming.dev Android development community!

The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License

founded 1 year ago
MODERATORS
 

There is probably something like this already, but probably not free and open source, as quick search through F-Droid did not show it.

A fitness app where you place your phone under your face and it counts how many push ups you did.
What would be the best way to detect a push-up?
My idea is to have user touch the touchscreen with their nose. That would initiate the first part.
Second part would be more complex: use the front-facing camera to figure out if user's face is far enough to be considered a completed push-up. User would have to calibrate the app at the start, or maybe even at the start of each session, indicating how far away is the max height that they achieve. Probably no need for full facial recognition for this, some colour-matching algorithm should be enough. And use phone's gyro to check whether phone is actually in a horisontal position.

Maybe this idea has enough potential to actually get a project going.

top 5 comments
sorted by: hot top controversial new old
[–] [email protected] 6 points 1 year ago

Or you could have them place the phone on their back and use the sensors to detect the up and down movement then audibly count the reps.

[–] [email protected] 3 points 1 year ago

How many are you doing that you lose count?

[–] [email protected] 2 points 1 year ago

The proximity sensor may be the way to go, but the range is pretty small. Still, less complicated than using the camera, and if someone is seeking this kind of app, I doubt they'd want to "cheat" by only pushing up 10cm, haha. Could place the phone under your chest instead of face too.

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago)

There used to be a lot of apps that did this after the year 2000. Maybe you could ask for microphone permission and add one push-up when the user says something loud (anything actually as long as it’s loud). It would add one push-up when you’re close to the microphone and say one, two, three, etc.

No need to recognize words or translate, just add one according to the level of the sound.

[–] [email protected] 2 points 1 year ago