Hi I want to be able to recieve a text on my phone and have the app read the text and give it access to my javascript.
Hi
Well, we need to know more:
- How is the text being sent to your phone? Is it from a microcontroller?
- You are running JavaScript from your App to apply a Sort or something like that?
- Why isn't your App receiving the text directly?
- Your Topic title says "How do I store the text on a received message" but you don't mention that in your description?
- How 'big' is the text? Is it a list?
- What format is the text? e.g. CSV.
I am talking about a recieved test message to my phone that needs to be stored as a variable that I can access via javascript on a html web viewer screen page. What activities on the mit developer gui would allow that functionality?
Use the Texting component to capture received messages
Use the webviewstring to transfer the message variable to the webpage, (or insert to javascript in the RunJavascript block)
and if you want this to work also while your app is NOT up and running, try the sms receiver extension, which is able to start your app after a sms has been received
Taifun
Before you get all excited and go to the link Taifun provided, note that SMS Receiver is NOT free. It costs $15 This is a PAID extension.
Is this right? I dont understand how I would get the variable and run javascript from a webviewer using the message recieved text
Why did you not set the messageText to the WebViewString ?
Read my previous answer
Taifun
Hi, Taifun. Im having troublw understanding. Is this it? See picture. I want to be able to load an html page and grab the value from webviewstring.
Yes
Let me suggest to do the tutorials to learn the basics
A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook App Inventor 2 Book: Create Your Own Android Apps ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here Course In A Box and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps
How to do a lot of basic things with App Inventor are described here: How do you...? .
Also do the tutorials Our Tutorials! to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor
Taifun
Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.
Hi Taifun,
So I have the basics down. I also was able to load the html on the webviewer. But when I recieve a text, the alert isnt popping out. The js i wrote doesnt really make sense with me because shouldnt there be an event listener?
What about providing your html + js?
How could we know what you are doing?
Taifun
I was able to apply thw solution, thank you