Solution to android modular upgrade

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.