Maintain the activity of an application in the background

Hello

Yes it is.

Sincerelly

:question:

Hello Taifun

Thank you, you helped me with your extensions in the past, now i will try.

Sincerelly

I just discovered how quote post, well, sorry i dont really understand your questions but i have wrote an explanation of my problems.

Sincerelly

Hello

Is there something wrong because nothing happen when launching.

Sincerelly

some observations

  1. in procedure app you forgot the argument x, which is required there

  2. you can't use labels in the background, use a notification instead or use the text to speech component or use the notifier to log something you can read in logcat, Capturing Device Logs using adb logcat

  3. if you want to trigger the Clock1.Timer event in the background, then you have to register that event for background processing and use a background handler which looks like a procedure...,how to register events see for example here Battery checker reminding you to unplug when fully charged

Taifun

Thank you Taifun

What is this ? : argument x

Why "background" ?
i thought that "process" run in foreground

Sorry i dont understand anything, i think i'll let it down.

Sincerely

This is an argument x
Screenshot_20240311_171626_DuckDuckGo

Both run in the background, a process runs in foreground mode and needs to display a permanent notification
You might want to read post 1 of the itoo thread again

Itoo is for advanced developers who do not hesitate to follow the guidelines memtioned earlier and are ready to experiment a little bit

Taifun

Hello

Not so easy to understand for non english speaking and non advanced developers, i would not use app inventor if i was.

keeps the service alive throughout the session without interruptions.
a permanent notification will be displayed throughout the session from Oreo.

I would understood better : a permanent notification must be displayed throughout the session from Android 8.

Thanks

1 Like

Hi @Jeff_Nash, I'm sorry for the complexity caused.

I will take the initiative to rewrite the documentation in a easy to understand manner this month. Thanks for your feedback!

here is a test project for you, which does more or less what you were trying to do
after clicking button start you hear a voice saying "This is the beginning", the app will close and after 5 seconds the voice will say "This is the end"

jeff.aia (69.1 KB)

Taifun

Thank you Kumaraswamy and Taifun

As I would like to have your knowledge and your talent, I get nowhere and I have given up on pursuing it.
Here we go again.

Sincerely

Hello

Take a look at what i have done based on Taifun app.
App is running also in android home screen and android lock screen and both.
When redisplay app the label is up to date and that is very good.
I hope i can continue in this direction with my app.

Sincerelly

1 Like

great, that you continue experimenting!

this is because you never closed the app... you just move it to the back and it was still running... to close the app use the close application block...

to be on the safe side use the FetchProperty method to fetch label text in the Screen.Initialize event

Taifun

1 Like

Yes, this is i want to obtain, app still running in background.

Ok, but i dont know how to do

Sincerelly

what you want is to reliably have the app running in the background
if you only move the app to the back, it is still running but can be closed any time by the Android operating system in case more system resources are required. Also not everything is doable in this state.

Unbenannt
please also understand the purpose of the valueIfTagNotThere socket... in your case you use numbers, so that default value should be 0 and not the text zero
Unbenannt2

Taifun

Hello Taifun

Yes, is it possible to make the app running anycase ?

Yes, but I think that doesnt matter in this case.

Sincerelly

if you use itoo correctly, then yes
currently you use a clock running in the foreground and another clock in the background... that clock in the foreground might be stopped by Android if you move the app to the back...

see my new example how to do it correctly only in the background...

jeff2.aia (69.4 KB)

Taifun

Hello Taifun

Ok, thank you very much, i will try to implement that.
I guess i can create several processes, or not ?

Sincerelly

Hi, no you cannot create several process. You can simply merge them into one process and you'll be fine.


I've also rewritten the documentation for the extension, you can check it here: