Welcome! Log In Create A New Profile

Advanced

[WM 22] App close when move to the background

Posted by Stefan F. 
[WM 22] App close when move to the background
November 15, 2020 06:02PM
Hello dear colleagues,
I am looking for a way to close an Android app as soon as it is set in the background.

Does anybody have a solution ?

Regards
Stefan
Argus
Re: [WM 22] App close when move to the background
November 15, 2020 10:14PM
When the app goes to the background, the "loosing focus" code of the window is executed... Just put an endprogram there.
Re: [WM 22] App close when move to the background
November 17, 2020 09:52AM
thank you for the solution.
unfortunately endprogram () does not have the desired effect.

the app remains visible in the background.
Re: [WM 22] App close when move to the background
November 17, 2020 02:12PM
Hello Stefan,

Not a hundred percent sure.
But closing the first window of the application should close the application.

Like calling: Main.Close()
Re: [WM 22] App close when move to the background
November 17, 2020 06:14PM
thanks again for the suggestion.
Unfortunately, the Close () command does not work in this regard either.
Re: [WM 22] App close when move to the background
November 23, 2020 08:25AM
good Morning ,
since it is now unfortunately not possible to forcibly remove the app from the background, i looked for alternatives.

actually the "lost focus" area is called when the app disappears in the background. then i thought about making the fields invisible.

window.field..visible=false.

but that doesn't work either.

The problem I have is that when the app is in the background, fields with content are visible that should not be read.

does anyone have another idea ?!
Solved [WM 22] App close when move to the background
November 23, 2020 01:49PM
ok, here is the solution … you have to put the following code into a procedure

{
getActiviteEnCours().finishAndRemoveTask();
}

and you have to call the procedure inside your "focus lost" section



regards stefan
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: