Which syntax to use in my manifest folder to keep app alive in Andrioid 9.0

My streaming app is working but shuts off after an hour or so, as of right now I can only use one android command via the manifest folder at a time. So my question is this: What command would keep my streaming app open the longest? Wifi Command? Foreground? or Battery optimization? I can’t use more than one command I get errors and it won’t allow me to compile the app. Also, it has come to my attention you can only do one command syntax at a time.

image

image

1 Like

@Harry_Morrisseau I think you should use Foreground command. But if you try by your own checking one by one. So, it is easy for you to understand. Where I should use this command and where this.

1 Like

I am trying Kodular User FOREGROUND_SERVICE right now, fingers crossed. Yes, I have to try them one at a time, just not sure what wifi command to use, any suggestions.

1 Like

You tried Foreground?
And it works properly?

Aww, it shut down faster than battery command. I can’t seem to track down exactly what is causing it to stop, so I disabled run in background in app settings.

1 Like

You tried all?
If yes, then which works properly?

Right now with background disabled in my app settings seems to be working but I have to have the app visible if I minimize that’s when it shuts off in a bit and I have to press start button again. So far so good. Update: it works great I had to disable all references in battery settings on the phone and the app itself to not use background at all. Over a hour now. I thinks I gots it wooooooooohoooooooo all night last night fell asleep