How do you connect open trivia api with mit app inventor

Does your url work in your computer browser or even if you set the url to a webviewer ?

1 Like

yes sir, the URL is working in my web browser.

I didn't understand your second question, what it means by "set the url to a webviewer"?

Drag out a webviewer component, then:

image

Do you see json ?

This is just to test connectivity of your device to the server, using the emulator

Sir, Can you send me the whole code please? Because if I use webviewer I will not able to use response content. I am attaching my app file below , I will be happy if you can edit that blocks which you are sayingopentrivia.aia (1.7 KB)

Try this

opentrivia_revised.aia (1.9 KB)

as I said:

1 Like

Thankyou for your response sir but I am still getting error.

What to do next sir??

In the above reply of "ABG" the json format was shown but i think he used different emulator, Do you know how to use and connect that emulator?

Can you get to any url in the emulator?

Try https://google.com

This might be a bug of some kind in the emulator.

Do you have wifi and a real device? If so use the companion app
http://appinventor.mit.edu/explore/ai2/setup-device-wifi

@ABG provided a link above to the various emulators available. ABG uses Memu, I use Genymotion.
Just make sure, which ever emulator you use, is on the same local network (wifi) as your computer

For the Google its working

yes, I use same wifi on my router.

For the link above with json text, its also showing 1101 error in companion .

Can you please share any video or link or instructions, how to connect Genymotion or Memu with MIT app inventor?

My emulator version is 2.3.0 , is there any latest version, if yes should i download and check?

It is strange the emulator doesn't like open trivia....

You will find these in the link already provided (twice...) Scroll to the bottom of the list in the link.

Thankyou sir But for the Memu play I am getting same error

What could be the problem?

Thankyou sir But for the Memu play I am getting same error

What could be the problem? Please help me with that sir.

I believe you have some sort of network issue at your end, or a blocker or antivirus issue. YOu will need to investigate why you cannot reach opentrivia ?

1 Like

How to find network issue or blocker or antivirus issue? What are the requirements for the idle connection or antivirus to reach trivia , what type of connection or antivirus you use so that you are able to connect with json?

@TIMAI2 @ABG sir, can you please help me how to solve this issue of error 1101, as @ABG is getting output but why i am not able to?

I changed the browser and it worked. Thankyou so much @ABG and @TIMAI2 for your responses.

1 Like

More likely the 4.2 or thereabouts emulator has insufficient memory or something in nb187 is incompatible with the emulator in the Web component.

1 Like

Maybe the OP asked for file storage by the web component, and got caught up in the File storage bugs?
I had
Web1 properties

in my sample.

What did you change?

1 Like

For the mit app inventor emulator its is still not working but for the MEMU play and companion from mobile the output is shown properly. Thankyou @ABG for your help.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.