Solution to android modular upgrade
The native android version must be updated and installed throughout the apk, and some modular upgrades cannot be implemented:
Native + web hybrid APP ~
According to customer requirements, the program must be modularized and upgraded. No matter what method is used, I did this. Each function homepage is written as html and stored locally (asset ), in html, action is used to operate all requests on the server. The passing of values between requests uses signature + signature to ensure information security.
[Putting the Home Page locally without the server is a solution to display a page to users even if there is no network]
This is just a solution I have come up with. Please share it with me.
Public class MainActivity extends Activity {private WebView webView; protected void onCreate (Bundle paramBundle) {super. onCreate (paramBundle); requestWindowFeature (Window. FEATURE_NO_TITLE); setContentView (R. layout. activity_main); webView = (WebView) findViewById (R. id. appstore_webview); this. webView. setScrollBarStyle (0); this. webView. loadUrl ("file: // android_asset/index.html"); this. webView. setWebViewClient (new MyWebViewClient ();} private class MyWebViewClient extends WebViewClient {@ Overridepublic boolean shouldOverrideUrlLoading (WebView view, String url) {view. loadUrl (url); return true ;}}}
Example code: WebView