App keeps crashing and screen transitioning wont properly work even after trying numerous different things

Use different screens wisely

If you decided to use different screens, then you should switch them correctly, else you will run out of memory after a while...      
The recommended method of switching screens in App Inventor
(Thanks Taifun)
 
Also see demo: multiscreen.aia
 
1 Like

I have also tried this solution and it did not work!!

What did not work? We have been using this method for many years without issue.

Some advice:

Never try to close Screen1
Always close one screen (the screen you are on) - except as above - before moving to another
Do not try to "open" Screen1 again, otherwise you end up having it open twice

Or, just use virtual screens, and all the above problems will go away :slight_smile: (you probably haven't got time for this, if your deadline is tomorrow - why is it always tomorrow ?)

1 Like

If you look at my code, I never closed Screen 1.

This is Screen 2 (Sign up Screen)


As you can see at the end I am closing that screen that I am on and opening a new screen which is screen 3 (Sign In screen)

Below is the code for my Sign In screen

This is my home screen:

1 Like

When the user is on the home screen they should be able to click the mood button, then log and save their mood, and click next and this should bring them to the sleep screen it navigates to the screen sometimes but the UI isn't appearing.

I don't think I will have time to use virtual machines. My project report was due a few days ago but demo is tomorrow so I need to update the report and try get this app working before then.

1 Like

FYP1_1.aia (684.1 KB)

In this version, i tested with aia, no foreclose or app crash i found.. I created ac with the name gsr

1 Like

Hi, I have imported this and tested it on my phone. When I create an account the app crashes. However, the account is getting added to the database. When I Sign In it doesn't navigate to the next screen which is the Home screen.

I have tried to attach videos to show but the files size is to big


Could my problem be my MIT companion app? I can't seem to run the emulator on my laptop even though I have installed MIT App Inventor. The emulator doesn't appear on my screen.

This message stays on the screen

Here is a video showing what happens, it is trying to open it but doesn't down in the launch bar

in my mobile both working fine and no foreclose the app

Are you testing on android or iOS?

Android

you are using a mixture of methods to switch to another screen... sometimes you close the current screen, sometimes not...

also in Screen2 (Sign up Screen) you switch to another screen (SignIn) directly after sending the Get request to the server, i.e. you ignore the result from the web component...

Unbenannt2

use always the same method to switch screens and use the Web.GotText event to first get the result before switching the screen

Taifun

This error was corrected in my previous reply by shifting this open another screen under web got text event true logic block , even though he is telling it doesnot work in that project too..

@Niamh_Dunne whenever you make web request try using notifier progress dialogue, so that user cannot hit again the button before the previous request was execute. See your app

Account was created. The reason for your above error is, you doesnot wait before the request was completed, may be.

Hi, it is working when I test on android, but when I test on iOS, doesn't work. I don't know why.

Then Try to catch error list using logcat

How do I do this?

I need one for iOS

I borrowed an android phone from a phone shop for my project demo. When I test the app it jumps straight to 48% on the progress bar and nothing happens?

Anyone know why this might be happening? Both on the same wifi network and I also done a software update also.