Pavan tej
Pavan tej

Reputation: 183

how to pass data between screens using intent in MIT app inventor

I am a beginner in MIT app inventor tool. I am stuck on passing data between screens. I have searched a lot of time on the internet. I got lots of results using activity starter with intent, but how it is possible in MIT app inventor?

If in android we can pass data like this

Intent i = new Intent(this, ActivityTwo.class);

i.putExtra("Value1", "This value one for ActivityTwo ");

i.putExtra("Value2", "This value two ActivityTwo");

startActivity(i);   

by using bundle we get that data, but how it is possible in MIT app inventor?

Upvotes: 3

Views: 28580

Answers (1)

Taifun
Taifun

Reputation: 6293

You have 2 options to pass data between screens:

  1. to use the open another screen with start value block
    example: enter image description here as you can see, a value also can be a list...
    then in the other screen you can get the data using the get start value block

  2. to use TinyDB
    for example in Screen1 just store the data in TinyDB and read it again in Screen2

see also this example

Upvotes: 11

Related Questions