Posts

Showing posts with the label insert HTML in Android app

How to insert a HTML file into a Sketchware app

Image
How to insert HTML file in an app created in Sketchware? Suppose you have created an HTML file using HTML, CSS and JavaScript, and you want to create an Android app where you can view this html file. You can easily do this by following the steps given below. 1. Add a WebView webview1 in VIEW area of your android project in Sketchware. 2. Through sound manager add a sound file to your project (e.g. button.mp3 ). 3. Save project and exit. 4. Go to file manager and copy your HTML file ( myfile.html ). 5. In sdcard, navigate to .sketchware/resources/sounds/(your project no.)/  and paste the HTML file in the this folder. 6. Delete the sound file (button.mp3), and rename the html file ( myfile.html ) to same as the sound file ( button.mp3 ). Thus myfile.html is renamed button.mp3. 7. Open the project again in Sketchware, and in onCreate event, use the Block WebView loadUrl........ , and put following path in it: file:///android_res/raw/button.mp3 Or file://...