Skip to first unread message

Mage Justice

unread,
Mar 2, 2019, 11:28:49 AM3/2/19
to MIT App Inventor Forum
Hi all,

I am having some trouble sending multiple data between different screens.

I created a system to encode a string of data and then extract it on another screen when it opens, but it doesn't seem to be working and I have no idea why. The system works by adding spaces to the variables so that all variables are exactly 10 characters long. The program then extracts 10 character sections of the data, trims the extra spaces, and then we have the raw variables. I do this because I can only send one starting value, so I am trying to cram as much into that starting value as possible, as I need a lot of data to transfer.

I have attached the code between the two screens, does anyone know why this is not working?

Also, if I were to initialize a variable, and also set this variable as something else when a screen opens, will that screen display the original value of the variable or the new value? I heard somewhere that  App Inventor does these starting processes in a random order. Is this true? Is there any way to get around this? Any other ideas?

Thanks so much
Mage Justice
Screen Shot 2019-03-02 at 11.26.04 AM.png
Screen Shot 2019-03-02 at 11.25.55 AM.png

TimAI2

unread,
Mar 2, 2019, 12:00:33 PM3/2/19
to MIT App Inventor Forum
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

If you haven't done it already....

Mage Justice

unread,
Mar 2, 2019, 12:54:53 PM3/2/19
to MIT App Inventor Forum
Thanks for the quick reply.

Seems like a good idea. Is there a limit to how much storage a single screen can hold? I am probably going to be using a bunch of long sound files. In addition, is there a problem with the code I attached in my first post, in case I do decide to use other screens? And also the question with initial variables (see last post).

Thanks ,
Mage Justice

TimAI2

unread,
Mar 2, 2019, 1:09:19 PM3/2/19
to MIT App Inventor Forum
1. Suggest you do not store your long sound files "in the app", but download them to the sdcard on first use, or as required


2. I refer you to my previous post, with regard to switching screens correctly

3. Also refer to previous post, but you would need a tinydb to save variable values which would then be available on other screens, you could also use this to change the blocks you have shown
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages