How to close a screen correctly in thunkable

I am working on an application that requires a lot of navigation between screens
the problem is, when I navigate between the 2 screens that I have, the app slowly gets slow.
that slowness that the app has after opening and closing the screens, led me to investigate why that happens.
and I found that thunkable when navigating between screens does not close them, I did several tests and found that it does not close them, and that is the reason why the application becomes slow.

The first test I did was, navigate between 2 screens, after the 10th time the application starts running a little slow.

The second test was, opened in another screen with a game in web view, when returning to the main screen the music of the game continues to be heard. To solve that, what I did was press the back button that android has and there the screen closed perfectly.

and finally I emulated the app to see the FPS by doing that action of opening and closing the screens several times, and this is what happened


As you can see the fps are stable, but when I open and close the screens multiple times it passes this …

My application only has 4 screens and I only navigate between 2, I don’t have many blocks but I need to navigate many times between those 2 screens

2 Likes

Could you send the link so I can have a look at the code?

It does not have many blocks and the 2 screens that I use are those 2 nothing else


Captsssura
Captura

1 Like

Again, I need the link. The pictures are too small.

the problem is not the blocks, it is thunkable. Doesn’t close the screens properly

1 Like

It would still help to see all aspects of the problem.

I haven’t been having this problem

look at this simple example i made
https://x.thunkable.com/copy/20507d91a83b4617af47974ded8c1a11
open the game screen then let the game play, once the game begins to play sound press the back button, you will see that the game sound continues

1 Like

Seems like you’re correct.
:thinking:
Not really sure how to help you, so sorry. :pensive:

1 Like

you see that’s a thunkable bug :slightly_frowning_face: :frowning_face: :pensive:

To avoid opening duplicate copies of the screen each time you navigate to it, put your screens in a navigator.

3 Likes

hi muneer, i just did that. now I have to accommodate the components as they do not fit.
but hey, thanks muneer this is the solution for this situation.
Anyway thunkable should fix that, because the video, audio or some web with sound does not close they keep running

1 Like

You can address this to Thunkable. As for your issue about opening screens many times slows the phone, I already answered you.

no, it doesn’t work with bottom tab navigator either. with the only component that if it works and closes the screen correctly is stack navigator

1 Like

So it worked. This is the bottom line.

Yes, that would be the solution, but in my case it doesn’t help me much. I will continue looking for alternatives, because the snack browser only has a back button to close the previous screen, and my app has a button that executes the action and then I would have to close the current screen.
As there is no button to close the current screen, I have no way to do it because there is only the button to navigate between screens and what it does is open the screen, when this action is executed so many times the application slows down because you have many screens open

1 Like

A post was split to a new topic: How do I reduce polling frequency?