App is crashing on every first launch

see here:

1 Like

Is it necessary to close the screen before we close the application? Close application block doesn’t close all screens already?

closing screen is not a problem , the problem is app crashes when we use close application on first launch.

Closing block is working fine, but the the problem is app crashes when we use " close application" block on first launch after closing application.

I think no.

Remove

From Screen2

2 Likes

if i remove close application, how to close application.

As I told you

1 Like

like this ?Screenshot (151)

1 Like

Yes. build it and see what happens

works like charm, what was wrong with close application block ?

You need to have an underlying screen for the close application block to work on second screen

1 Like

what does that mean, i have to use close application directly without closing current screen, unfortunately that also induces the same problem, but if i return to screen 1 the same method (which produces error when exited from screen2) works perfectly.

Android apps continue to run in the background, even after you’ve moved on to other tasks or close the app.

Screen2:
grafik

Since “close application” could no longer be executed after “close screen” on Screen2, this command remains in the background so that it is first executed the next time the app is opened. This immediately closes the app. It is NOT a crash! If you open the app again afterwards, it works.

So, for whatever reason this approach is desired, try this on Screen2:

grafik

That doesn’t mean you should do it that way, it should just demonstrate how the processes work.
So build APK and try.

4 Likes

Note: If you kill all background apps or only this (using the task manager) before you reopen the app, even your first approach will work (proves the same).

2 Likes

wonderful explanation, Thank you.

1 Like

But if you Close application from screen 2 without closing screen (by disabling the closecurrentscreen block) then also app closes on first launch.

yes that’s 100% right, i have tried it.

1 Like

To make it simple, if using Tribblehunter method as you are doing, then don’t use the close application block, use only close block on all of your screens

1 Like

okay, i was asking why the method given in question works perfectly on screen 1 and produces error when used in screen 2 (both the screen has same blocks)

1 Like