This example provides the device specific info Android Version, Language and Device type
The HTML file info.html is uploaded as asset to App Inventor.
There is one special thing to consider for HTML documents uploaded as assets into App Inventor: During development, you have to use the development path to the embedded HTML document.
Before packaging the app, use the production path.
You probably also might be interested in the example How to get the Device ID within App Inventor calling a Java app
and How to get the Phone Number of the Device with App Inventor .
Note: Andrea found an alternative way to detect the language of a device with the text-to-speach component,
how it works, see here. Thank you Andrea!
For newer Android versions, the navigator.appVersion object does not provide the language anymore.
I therefore added an if statement in the logic and read the language from the navigator.language object for newer Android versions now.
A screenshot of the parse procedure you can find here
I can help you: for one hour I charge 25 USD.
Please contact me at info [at] puravidaapps [dot] com for details!
For questions about App Inventor, please use the App Inventor forum. Thank you.
<!doctype html> <head> <meta name="author" content="puravidaapps.com"> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Info</title> </head> <body>
Q1: I have a problem with the select list item block. When I first time open the my app I see a error message
"Select list item: Attempt to get item number 2 of a list of length 1".
A: try to add an else if length of list get listResult > 2 statement.
Q2: Both, file:///android_asset/info.html and file:///mnt/sdcard/AppInventor/assets/info.html don't exist, what can I do now?
Tested successfully on HTC Desire running Android 2.2, Samsung Galaxy Tab 10.1N running Android 3.2 and Nexus 5 running Android 5.0.1.
Developing and maintaining snippets, tutorials and extensions for App Inventor takes a lot of time.
I hope it saved some of your time. If yes, then you might consider to donate a small amount!
or donate some mBTC to Address:
Thank you! Taifun
This work by Pura Vida Apps is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License
with attribution (name=Pura Vida Apps and link to the source site) required.