Skip to first unread message

Víctor Llaneza Vega

unread,
Jan 27, 2018, 5:37:37 AM1/27/18
to MIT App Inventor Forum

Hi everybody

First of all thanks for the knowledge I am getting reading and watching in this page. I am not an informatic at all but I am making some progress :)

I am working in an app, a big quiz, and I have a couple of doubts.

1) What is the limit for elements in a list? I mean, if I use a list of 2.500 questions the app will work too slow ?(the only operations needed are searching for a number in the list, random, random in an integer…)

I ask this because there will be different levels of difficulty in the quiz and I think about two ways:

A) Making only one big list with ALL the questions. Then, depending on the level (I can use a ‘variable’ for this) the app will use a part of that list (questions 1 to 50, 51-100 for example).

B) Making a variable and work with separated lists in the same screen (each of 300 questions, for example).

If my app has 10 levels both options would require a 9 or 10 ‘if/thenS’ for the app to know where it has to search for questions. Is it too much?

2) All the gifs I am using are in the web (basically my google docs) to avoid the ‘out of memory common issue’ . It is working great in my trials and I keep the size of the app in less than 2mbs. However, problems are arising, I would like to add many mp3 archives for some questions and cannot do that by linking to my google docs (or I am not able to). I have tried with the ‘sound’ element and with the ‘player’ as well but the mit app does not read/play the link. Then the only solution for me is to try to make a ‘only once downloading’ mp3 arvhives when the app is running for the first time or is it possible to link audios the same way than images? (I would prefer this, I am afraid I would not be able to ‘code’ the ‘downloader thing’).

Thanks in advance and sorry for my English.

TimAI2

unread,
Jan 27, 2018, 6:24:53 AM1/27/18
to MIT App Inventor Forum
B) is probably the better approach, make nested listpickers if needed to guide the user to the correct questions, and a master list that links to the minor lists of questions for levels.

2) Google drive links for audio can be a bit finicky, but it should still be possible. Please provide some blocks of what you have tried so far. You can use urls to music files but you may need to introduce a clock timer to give AI2 a chance to catch up.

Víctor Llaneza Vega

unread,
Jan 27, 2018, 6:44:54 AM1/27/18
to MIT App Inventor Forum
Thanks for quicking response and hint! :)

The mp3 archive I use are so small (sometimes just words, sometimes short sentences)

For example, one link is:

https://drive.google.com/open?id=1d4CaXc4TFQJIB-VdFATEWf3-RL71ahMH

a very short audio.

This is the link format proposed by google as a 'link for sharing'.

With the images from my google pictures I have no problem, the app detects them and upload them inmediately, however no way to play these audio files. It reads the source, I think, but when it has to 'play the sound', it is unable. I doubt it is a coding problem (the process is quite simple) but maybe there is smth wrong with the format link or, as you say, adding a clock, it could work, I will check, but I do not think it is a 'need of time problem'.

Thanks again for your support.

TimAI2

unread,
Jan 27, 2018, 7:33:56 AM1/27/18
to MIT App Inventor Forum
You need to do two things:

Ensure all your sound files are public, shared with the world
Change your sound file links from:

this:

https://drive.google.com/open?id=1m_gev2u_n_WrJvHh4tVKdXTrCSeMenwo

to this:

https://drive.google.com/uc?export=download&id=1m_gev2u_n_WrJvHh4tVKdXTrCSeMenwo

then it will work


Víctor Llaneza Vega

unread,
Jan 27, 2018, 8:01:27 AM1/27/18
to MIT App Inventor Forum
Thanks! :) :)

Abraham Getzler

unread,
Jan 27, 2018, 6:22:16 PM1/27/18
to MIT App Inventor Forum

Abraham Getzler

unread,
Jan 27, 2018, 6:29:29 PM1/27/18
to MIT App Inventor Forum
Regarding your big quiz, try to keep your data in files and
lists, not hard wired into your app.

Your app will be simpler if it is table-driven.

For an example, see Wheres_MIT:

ABG

Víctor Llaneza Vega

unread,
Jan 28, 2018, 6:43:58 AM1/28/18
to MIT App Inventor Forum
Yes, it is perfect. I know how to nest list in lists. Thanks for the help, I love this forum :)
Reply all
Reply to author
Forward
0 new messages