Close application with warning message

I use for two applications the same way to close them.
In one it works correctly, while in the other it doesn't.
That is, with the back button, the application remains open and does not close after selecting Yes in the Notifier.


It was working fine on the too apps, but after putting a popup menu through an extension it stopped working!
Is their not working related to the UrsAI2SideBar extension?

I see you use multiple screens. The problem may be poor screen switching management. Show us screen switching blocks from all screens.

You can also place here a project that presents this problem to us.

Show us screen toggle blocks from all screens.

You can also post here a project that presents us with this problem.

How can I do it, I don't know
Screenshot_1

Before I had 5 screens and it was working fine

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.
export_and_upload_aia

Here it is
DIKTYOYRGOSDIAD.aia (735.3 KB)

I use same way to close the app also on an other app with more screens

As I thought, the problem is poor management of opening screens. Opening a screen in AppInventor is creating a screen. So you create multiple screens but never close them. The open screen remains in memory. You have several instances of the same screen open in the background. When closing the app, not all screens will close and that is why we have the effect of an open app after closing.

Instead of a single screen opening block:
blocks - 2024-01-21T120207.339

use this approach with closing the screen:

Improved design:

DIKTYOYRGOSDIAD.aia (736.7 KB)

Close screens when you go to another screen, this way you will avoid problems with closing the app and overflowing the memory.

Thanks a lot for the help, but I installed this what the image shows and the app won't close with the back button. It doesn't close from the home screen where I put these here in the image, while the app closes from all the others.

I want with the back button, from the other screens which I visit after the home screen to return to the other screens or posts of the blog and the application to close only from the second screen which is also the initial one after the welcome screen

Do you have a webviewer on every screen ?

So please share my project with improved screen management, updated with the blocks you showed in the image. Because your previous project does not contain these blocks.

Yes I have a webviewer on every screen

DIKTYOYRGOSDIAD.aia (737.5 KB)
Here it is.
I tried to do something where with the back button I can go back to what I have previously visited and when I get to the home screen which is screen2 then it closes with a YES or NO choice message

The current and home URLs are different all the time.

Change your home URL to:
https://gataros.blogspot.com/?m=1

Additionally, I believe that the screen should be open all the time. Closing it causes small problems when reopening the app.

Improved project:

DIKTYOYRGOSDIAD.aia (737.3 KB)

1 Like

Now it asks if I want to close it, but I need to add something else to the other screens so that with the back button it doesn't close, but goes back to something I've visited before and only closes from the home screen after it asks.

So instead of putting a block to close the app in the Back Pressed event, put a block to open another screen there.

You can pass the name of the previous screen in startValue.

after closing it won't reopen but just stuck on the welcome screen

Now with the back button it brings out the welcome screen and then when I go to open it again it gets stuck showing only the image of this screen

I did not notice this problem in the project I posted above.

If you have previously visited websites such as:
Prova
Screen 2
offers
Screen 3
about
Prova
Tecnology
Screen3
Screen2
about
Technology
offers

so when you go back, you want to go through all previously visited pages one by one?

Sorry for my confusion.
I finally found the solution.
My fault for not being as clear as I should have been to let you understand what I wanted
Now with the back button I go back to screen2 which is the original home screen for begin to navigate my blog, from any screen I've visited come to the home screen that is the screen2. And now it closes properly and when I want to open it again it opens from the beginning with the welcome screen.
Thank you very much for the help