kept application active despite the screen off


A big thank you to MIT APP Inventor without whom I would not have been able to achieve this small personal project.

I created a GPS tracking application because I will be leaving for a year with my camper van. I'll be using an old, permanently plugged-in phone for this tracker. The tracker will allow me to, I hope, find my vehicle if it is stolen. It will also allow my family to know where I am live. Finally, I would have the layout of my entire journey through Europe and America.

To do this, the application sends the GPS coordinates to a MySql database with the GET method and a bit of PHP. The sending is done at regular intervals configurable in the app (60 seconds by default).

Everything works fine ... except when the screen is off. There the sending is no longer done at regular intervals. Where the sending must be done every 10s for the test, there is a send after several minutes.

Is it possible, that screen off, the sending interval is not disturbed ??

I have lifted the data and battery consumption restrictions for the app.

Thank you for your help

for this purpose there exists an extension you might want to use...

alternatively you will have to keep the screen on to keep the application alive...
one method to do this is to use the KeepScreenOn method from the tools extension
App Inventor Extensions: Tools | Pura Vida Apps but this will drain the battery faster...


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

If the device falls into Doze mode, all possible functions (CPU, WiFi / Network connection, GPS, timer, ...) are throttled / shut down. To prevent Doze, a Foreground service is required.

Ok thank you. I will use keepscreenon so :).

Have fun

did you find a solution for your problem

Read posts #2 to #4!

I did not understand

As I told you in your other topic:

If using the Background Tasks extension does not work for you, then you will need to run your app with screen on all the time, or as a foreground service. There are, to my knowledge, no available extensions to allow you to do this.

That said, see here:

Also, please stop necro-posting every topic you can find about running in the background.


@TIMAI2 Why not necro post... if the answers to a question are not satisfactory then why not ?

Sometimes it is best to find out how to do something rather than rely on another extension.

I have exactly the same problem as @Ludovic_garnung and I prefer my own solutions. I found this post not too helpful and will have to search further.

the answers are in post #2 and #3

please elaborate, why these answers are not satisfactory in your case

It is an etiquette, we didn't create such rules...

Create a new post instead, and if the moderatos have to merge it to old topic, then in that specific topic only you can necropost.

so what is your expectation for a solution?
If you can figure out your own solution, then why not post it here for others to learn? there would be no need for an extension.
and if we already figured out a solution, we would have made a guide about it ages ago ...