Webviewer and App Inventor

Webviewer & App Inventor

From the Palette, expand 'User Interface' and add a 'Web Viewer' component to the screen.

How to read a HTML page stored as media file inside of App Inventor

The example uses 2 html files and an image stored as media files inside of App Inventor. In case you like to take a look at the source of these files, upload the App Inventor aia file to App Inventor and download the html files from the assets list.

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.

file:///mnt/sdcard/AppInventor/assets/<NAME OF YOUR HTML FILE>.html

Before building the app, use the production path.

file:///android_asset/<NAME OF YOUR HTML FILE>.html

Note: External anchors are working only for Android 2.x devices but not for Android 3.x and 4.x devices. Thank you Ehsan for finding it out.

Example: An external anchor is to go to the following url with a web viewer file://android_assets/page2.html#myAnchor. This works only for Android 2.x. You can go to this page file://android_assets/page2.html and inside the html document jump to the anchor, this works for all Android versions.

1

1

Comments

Popular posts from this blog

Office Tool_SPSS v23 + Serial key

How to Fix FATAL error Failed to parse input Document ?

How to Reduce Lazy Load Resources

Popular posts from this blog

Office Tool_SPSS v23 + Serial key

How to Fix FATAL error Failed to parse input Document ?

How to Reduce Lazy Load Resources