Android Question B4A: Is it even possible to run an app forever in background without Android 7+ killing it?

scottie

Member
Licensed User
Longtime User
I've tried every example / tutorial. Everything fails. Now trying to do a simple CLOCK widget. Android kills it too.
Just yesterday my friend was looking into B4A. He asked me if he could write (what he calls)a 'non-stop' GPS app with B4A. I told him 'I don't think so, I've tried'. I may have lost a sale for B4A, but I couldn't lie to him! I told him it could just be a Android thing.
I did show him all the good things about B4A. Can anyone help with producing a 'non-stop' app?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The relevant example is this one: Background location tracking
You are mistaken to think that the problem is in B4A. Some devices, by design, do not allow applications to run for a long time in the background.

BTW, you cannot create a clock widget unless you use a foreground service. Android will not start the widget app more frequently than every 30 minutes.
 
Last edited:
Upvote 0
Top