Git Product home page Git Product logo

android-webview's Introduction

Android WebView

Experiment with Android WebView based on various tutorials:

Development

Use Android Studio to import this Git repository

Adapt assets/web/ and res/values/strings.xml for predefined websites, allowed hosts...

Testing

Check the latest release for app-release.apk

Note: steps 10-12 are new for release v1.15updated for release v1.16

  1. 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

  1. Press Back on your phone or tablet to return to the first page

  2. 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

  1. Click on the Update Settings link to allow another site

Verify that you get to the Update Settings page with all the input fields

  1. Add https://www.google.com/ in the Other: field, and add the following in the empty Match fields:

host equals www.google.com

  1. Press the Update Settings button to submit the changes

Verify that your changes are shown in the result page (json format)

  1. 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

  1. 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

  1. Close the app and open it again

Verify that your new settings are still there

  1. 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/eBusiness.zip

  1. 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)

  1. 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:

  1. 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 eBusiness/index.html, also change the Other: field to https://appassets.androidplatform.net/sites/eBusiness/index.html (or http://localhost/sites/eBusiness/index.html) to go to the local site in your app after the update.

  1. Press the Update Settings button to submit the changes (v1.15+)

Verify that your changes are shown in the result page (json format)

  1. 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.

android-webview's People

Contributors

mikespub avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.