Should I forget about having a step counter be running in the background?


I used to be quite active in the old forum, Im the 48 year old bus driver and dad from Finland.

My issue is with the a step counter I build today.

It is working just fine, unless I quit using the app. And theres no notification about the rising amount of steps.
And I use the phone to all kinds of things , all trhe time.

So, should I forget about fully using it, or not?

Yes, forget about your step counter running in the background. App Inventor 2 apps still cannot run in the background (and might never).

A work around is to force the Android screen to stay open.
The best you can do is prevent the screen from closing using a Stay Awake routine .

Either use a Stay Awake block routine using a Notifier

or you use Taifun’s Tools Extension:

Be aware using either an extension or a block routine drains your device battery rapidly . These work around methods are not running the app in the Background, they force the app screen to stay open.

This will allow your step counter to run more or less continuously @BrandnameOra


Okay, thanks @SteveJG for the good reply, I thought so myself as well.

The step counter is a part of my working prototype for a dream fitness app.

And it’s a shame that I can’t have the step counter working in the background, but it’s not that important.
And obviously I’m not looking for it to keep my phone open all the time. Oh, where would it call when it would be in my pocket.

The next feature in my prototype is that I will have a custom search for a YouTube workout.

Okay, a quick question. Could I add my custom workout search to someone else’s step counter, or could I find an open step counter project?

I will go search for those now.

Have a great day.

Hey, could i do something like this?

I’ll let the app accumulate my steps and forward it to to the app, once I open it again?

I don’t need the app to be open behind the closed screen, so could it collect those somehow?
Or could I save them to a database?

You could try. Why not just try. I don’t think it will work but it might. Although it is possible steps will continue to count, the app is closed down. Where would you save the steps made while the app is asleep? Try some things and let us know what you discoverer. Sorry, I don’t know the answer.

Maybe. The tool you would use would be the ActivityStarter …AI2 can ‘talk’ to some apps. Using the Activity Starter has a section on how you might do that.

I learned about the ActivityStarter something about it’s usage here.
So thank you for that.

I will definitely think about it now…

A post was merged into an existing topic: Quicker search renewal