Starting with version 5 of the Android component, WebView is not delivered as part of the system, but as a normal application that can be updated from Google Play:

What does this give developers? Now HTML-applications can be embedded in. Apk without additional crutches. All HTML5 features will be available.
')
Consider the example of publishing a real HTML5 application on Google Play.
The finished application can be
downloaded from Google Play , all source files (JS / HTML, resources, Java shell code) are available in the help there.
Step 1. Creating an HTML5 Application and Setting Up the Environment
This step is skipped.
If you do not have a ready-made application in HTML5, there is nothing to publish on Google Play.
You can download the latest Android Studio
here .
Registering an account with the
Google Play Console is also beyond the scope of the example.
Step 2. Create an Android application
Open the Studio, create a new project and specify the minimum API Level as 21 (i.e. Android 5.0). The studio suggests that at the moment it covers more than two thirds of the devices:

In the next couple of years, older devices will sink into oblivion, but so far.
In the application, we need only one (one?) Activity containing a WebView. All code is literally removed on one page:

If interested, it can be viewed by reference in the application.
All we need is to make a couple of settings when launching onCreate and open the file with an HTML page. Like that
WebView webView = (WebView) findViewById(R.id.webview); WebSettings webSettings = webView.getSettings(); webSettings.setJavaScriptEnabled(true); webSettings.setDomStorageEnabled(true); webView.loadUrl("file:///android_asset/index.html");
Step 3. Adding HTML Files
Add the Asset folder to the project:

and dump our files there. It's all.
Step 4. Integration with Android
The application has external links (for example, to source codes on GitHub or to posting on Twitter). To do this, we will do our implementation of shouldOverrideUrlLoading, like this:
@Override boolean shouldOverrideUrlLoading(String url) { String host = Uri.parse(url).getHost(); if (host.trim().length() > 0) { Uri webpage = Uri.parse(url); Intent myIntent = new Intent(Intent.ACTION_VIEW, webpage); startActivity(myIntent); return true; } else { return false; } }
- just a few lines, it is clear from them that in the case of a link to a local page (in the host there is an empty string) it is not intercepted and opened in our WebView.
If this is an external page, then the link is transmitted to the system and it will decide whether it is necessary to open it on Twitter, in a browser selected by the user or something else.
Sometimes you need to do the opposite and tell the system to intercept some links and open them in our application. To do this, add an additional filter in the manifest for our Activity:
<intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.BROWSABLE" /> <category android:name="android.intent.category.DEFAULT" /> <data android:scheme="https" android:host="surikov.imtqy.com" android:pathPrefix="/RiffShareAndroid/app/src/main/assets/load.html"/> </intent-filter>
- now any links in the mail or web pages will be checked for compliance with our service. If this is a link to our service, you will be offered to open it in our application:

Total
The installation file takes less than 4Mb, there is full integration with the Android platform, all HTML5 tools are available (in this example, this is Web Audio).
In the next couple of years, the share of old devices will drop to zero and Cordova can be completely abandoned.