How To Make The App Never Being Closed

Hi,
I Need My App To Do Background processing
because it’s impossible in this platform
i thought that preventing the app from being closed will do it

is this possible?

you can use keep screen on function,

otherwise if your screen close or you go back like minimizing app will pause app and after some minutes mobile will kill that process,

Question is why you want to prevent it from closing. Why would users use your app if you won’t allow them to close it?

There was a topic on the App Inventor forum about this
https://groups.google.com/forum/#!msg/mitappinventortest/25m4WN0IHks/in0Fn9wtBAAJ

We as App Inventor powerusers had a lengthy discussion about if we should learn users how to do this.

So please tell us what kind of app are you making?

3 Likes

same problem in my app
my app play audio online and when my app goes recent audio is playing
but when user open app my and change audio “two” audio is playing together.

I Make An Time Managment App
Users Won’t Use It Because It’s Just For Me :slight_smile:
I Need To Have The App Functions Running Also When I Not At The App
Because I Need It To know When I Use My Phone To Get Notification About My Next Task
Also To Have Count Time Of How Much It Taked To Complete A Task
I When I Talking Not Closed I Meant I Can Minimize But The Function Would Still Run

Kodular or any builders doesn’t support running in the background.

I Far As I Know Keep Screen On Just Make It to not shut down the screen
i need it to never being closed for function to keep running
minimizing i want but not swipe to the side to complete shut down

Ya Because That I Need it To Keep Running Also When minimized
and never being closed by this menu
תמונה

1 Like

Like i said, that can’t be done.

Maybe this will help someone ?! The application does not work in the background process. I thought for a long time and I did it. When the application is minimized and the screen is closed, then in the application I turn on a timer that every 3 seconds turns on the audio player and emits an empty sound lasting 100 ms. I noticed that if you set the timer for more than 4 seconds, then the android starts turning off the background activity. This method restricts (interrupts) the normal operation of audio and video players, but for my security system application with push notifications, this was the only way out. If there are other options, tell me!
Screenshot_36

3 Likes

good idea!
could you provide aia for test?
thanks!

He showed you the blocks, do it yourself.

2 Likes

I didn’t exactly understand about the solution you proposing
could you please explain in greater details

If the app uses the CPU atleast every 3 seconds, it is not going to be closed by the system. - that is @vapes’s experience.
However, some dumb firmwares automatically close all background apps (except launcher, phone, keyboard etc.) when the screen is turns off. This behaviour is rather annoying than useful.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.