I love it!
How I didn't know about this till today, I do not know. I'm taking a class with ShawAcademy this month, and they've moved from using jQuery Mobile, PhoneGap and Android Studio to this much simpler, and FREE starter from the brains at MIT.
MIT App Inventor is an Android-only development tool. And, before 3 or 4 months ago I didn't own any kind of Android device. This is my first foray into Google Apps and ... I think this is gonna work out great!
Apparently, App Inventor has been around since, like, 2010 or 2011. This is the 2nd version of the software, yet it's still in Beta mode. There does seem to support out there on the web -- with tutorials and documentation, but much of it is not specific enough, or it is in a foreign language.
So, I'm just going to gather some notes here. Because I'm running into a wall on some of the things I want to do.
#1. Display formatted HTML inside the App.
I want to download some text from my company website, and then show it inside the app's as formatted HTML.
Two ways to display HTML in App Inventor.
- Use a Label object. Set it to:
[x] HTML Format.
Width [fill parent].
Height [whatever you like]. - Use the WebViewer object.
Defaults are probably fine.
To get the information from an external site:
- Use a Connectivity > Web object.
To store the information to a file, you need to:
- Use a Storage > File object.
Now, there seems to be a thing with the file paths, that is causing me so much problem.
I'm using an older LG phone from FreedomPop. It was inexpensive and I just wanted a testing device. It's not the fastest thing and the version of Android on it is getting older, with no hope of being upgraded.
I created a Variable to hold a filename for later use: filenameToSave = "testFile1.html"
And I created another Variable to describe the file path: testingFilePath = "......."
The dots is where I had the problem. What should the dots be? Different pages on the web say different things from different years and different situations. Most examples seem to be suggesting that a "developer" variable be created and set to "TRUE".
Why? There seems to be a difference in the way that files are handled in App Inventor with regard to testing and an actual app that has been packaged and posted online.
I had to go onto my phone and find the File Manager app, to figure out the correct file path on my LG. It turned out to be:
"file:///storage/emulated/0/AppInventor/data/".
"file:///storage/emulated/0/AppInventor/data/".
Now the pre-pended "file://" is very important apparently, or the WebViewer object will not recognize the file as a legitimate location. You'd think you could just use the filename "testFile1.html" or maybe "/testFile1.html" or even "./testFile1.html". But, alas, no. The only way I could get it to work was with the full path name and the "file://" protocol at the beginning.
Here's what the MIT App Inventor page has to say about it, which didn't work for me for testing.
Another developer remarked:
I found what was wrong with me. I included FULL path, such as "/mnt/sdcard/AppInventor/data/ ABC.txt" or "/emulator/storage/0/ AppInventor/data/ABC.txt"
Instead, as Steve shows, I changed it to "/Takafile/ABC.txt" or "/AppInventor/data/ABC.txt" then both work.
Instead, as Steve shows, I changed it to "/Takafile/ABC.txt" or "/AppInventor/data/ABC.txt" then both work.
Still new to this, so, I don't know all the ins and outs yet. These are just notes.
LINKS:
Free tutorial book (Online HTML)
LINKS:
Free tutorial book (Online HTML)
ReplyDeleteyour explanation way is too good, very easy to understand for all readers. Thank you for providing the best details and I want more unique posts.
Primavera Training in Chennai
Primavera Course in Chennai
Tableau Training in Chennai
Spark Training in Chennai
Power BI Training in Chennai
Excel Training in Chennai
Oracle Training in Chennai
Oracle DBA Training in Chennai
Social Media Marketing Courses in Chennai
Appinventor4arab.com
ReplyDeleteHi there, just became alert to your blog through Google, and found that it’s really informative. I am going to watch out for brussels. I’ll be grateful if you continue this in future. Lots of people will be benefited from your writing. Cheers! https://royalcbd.com/product/cbd-oil-2500mg/
ReplyDelete