Experiment with Android WebView based on various tutorials:
- https://developer.chrome.com/multidevice/webview/gettingstarted
- http://tutorials.jenkov.com/android/android-web-apps-using-android-webview.html
- https://ukacademe.com/MobileApplication/AndroidGUI/Android_WebView
- https://developer.android.com/guide/webapps
- ...
Use Android Studio to import this Git repository
Adapt assets/web/ and res/values/strings.xml for predefined websites, allowed hosts...
Check the latest release for app-release.apk
Note: steps 10-12 are updated for release v1.16
- Press on HTML5 Test Site link or select in dropdown list
Verify that the app goes to the site via its own WebView and not by opening the standard browser
-
Press Back on your phone or tablet to return to the first page
-
Type in another URL like https://www.google.com/ in the Other: box and press the Go button
Verify that the app does NOT go to that site and tells you the link does not match. This default behavior can be changed in Advanced Options to open the regular browser instead
- Click on the Update Settings link to allow another site
Verify that you get to the Update Settings page with all the input fields
- Add https://www.google.com/ in the Other: field, and add the following in the empty Match fields:
host equals www.google.com
- Press the Update Settings button to submit the changes
Verify that your changes are shown in the result page (json format)
- Press the My WebView link or Back until you get to the first page
Verify that your new website is in the Other: field, and the host match is there
- Press the Go button to go to the site you specified above
Verify that now the app goes to that site without telling the link does not match or trying to open the standard browser
- Close the app and open it again
Verify that your new settings are still there
- Click on the Local Websites link and specify a .zip file in Download Bundle from trusted site (v1.16+)
For testing, you could download a bootstrap template from https://bootstrapmade.com/ and put it on your site, e.g. https://owncloud.mikespub.net/Moderna.zip
- Press the Download Bundle button to download the site bundle and extract it (v1.16+)
Verify that your changes are shown in the result page (json format)
- Press the Local Websites link or Back until you get to the Local Websites page (v1.16+)
Verify that your local website is in the Site List now, and click the link to test it.
If you don't use Local Websites much and you unchecked the option to manage Local Websites separately, you can also:
- Click on the Update Settings link and specify a .zip file in Update Assets from trusted site (v1.15+)
If the .zip file contains a homepage at Moderna/index.html, also change the Other: field to https://appassets.androidplatform.net/sites/Moderna/index.html (or http://localhost/sites/Moderna/index.html) to go to the local site in your app after the update.
- Press the Update Settings button to submit the changes (v1.15+)
Verify that your changes are shown in the result page (json format)
- Press the My WebView link or Back until you get to the first page (v1.15+)
Verify that your local website is in the Other: field, and press Go to test it.
See Deep Links
See Privacy Policy