Skip to first unread message

Obi

unread,
Jul 28, 2015, 6:49:09 AM7/28/15
to MIT App Inventor Forum

Dear app inventor support,

I'm experiencing what i think is an issue with my app. On the said page i have Seven buttons each of which has different functions. However Three out of those buttons are supposed to open three different webpages, while another is supposed to send an email then the last places a call to a predefined number. The remaining two buttons haven't been worked on yet. For the buttons that open webpages and email, when i test the app on my phone the first response it gives is to turn data on even when the data is turned on. sometimes i have to try twice or more before it goes through. I need you to check if i arranged the blocks properly because i set it up to check for internet access before proceeding. when i use do it on the first first block in web.gottext i always get false as a response. 

This image is for the send email button. However the blocks are similar for the buttons that open certain pages the only difference is the activity starter DataUri.


Taifun

unread,
Jul 28, 2015, 10:34:39 AM7/28/15
to MIT App Inventor Forum, silv...@gmail.com
the web component works asynchronously, which means, it takes a few milliseconds until you get a result back in the Web.GotText event
therefore it does not really make sense to continue with your logic after calling web.get (see blocks circled in red)




you will have to continue in the Web.GotText event
as you have several buttons, you might want to add a variable to identify, which button has been clicked to continue with the correct task  in the Web.GotText event
Taifun

Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by Taifun.         

Obi

unread,
Jul 28, 2015, 9:18:59 PM7/28/15
to MIT App Inventor Forum, taifu...@gmail.com
I have made the necessary changes and it works fine now. Thanks. I Wonder if i'll get to the point where i know exactly what each block does and how it works...
Reply all
Reply to author
Forward
0 new messages