How do I minimise app?

I want to minimise my app in background without loosing bluetooth connection of function.

to minimize your app you could use the MoveTaskToBack method rom the simple notification extension https://puravidaapps.com/notification.php
for background services there meanwhile exists also an extension, see here BackgroundTasks Extension by Atom_Developer (25 USD)

Taifun


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

1 Like

Hi,

I have an audio component playing an audio stream. when the app is closed by the center android button (home) the music continues, but when the back button is pressed the music stops. I tried also the MoveTaskToBack but does the same as the default backpress.

Right now I just disabled backpressing, but I'd like it to do the same as the center button does. Which is, I don't know, call the launcher? Do you have an idea about that?

Thank you very much

Also found this, may be of use:

https://groups.google.com/d/msg/mitappinventortest/nu_mcDy9AOQ/GvZZmhocbisJ

No, the app will not be closed, it will be put in the background. But on many devices the audio (streaming) is no longer played after a while (because of Doze mode). If you want to avoid the sound stopping after a while, you need to use a Foreground service.

Btw, this topic has already been discussed intensively and extensively on all AppInventor forums. Search for "streaming app" or "radio app" ...
(search also the old AI2 forum)

1 Like

Finally,

I just found this extension Back-To-Home which provides exactly what I need: a method to minimize the app without closing it, effectively overriding the BackPress behavior.

It's as simple as that:
blocks(2)

So thanks everybody, see you around! :v: :sunglasses: :heartbeat: :sparkling_heart: :sweat_smile: :white_check_mark:

edit: oh lol I thought I was OP. Never mind. OP if you test this extension, tell us if it works. I think it will