Http://www.cnblogs.com/yejiurui/p/3413796.html
1. Test Web page
2, need to set the WebView as follows:Private WebView Mwebview; @Overrideprotected void OnCreate (Bundle savedinstancestate) {super.oncreate ( Savedinstancestate); Setcontentview (R.layout.fragment_main);//if (savedinstancestate = = null) {// Getsupportfragmentmanager (). BeginTransaction ()//.add (R.id.container, New Placeholderfragment ()). commit ();/} Mwebview = (WebView) Findviewbyid (R.id.webview); Mwebview.setwebviewclient (new Webviewclient () {@Overridepublic Boolean shouldoverrideurlloading (WebView view, String URL) {log.e ("Test", url); Uri uri=uri.parse (URL), if (Uri.getscheme () equals ("M") &&uri.gethost (). Equals ("test.com")) {String pkgname= Uri.getqueryparameter ("package"); String arg1=uri.getqueryparameter ("arg1"); LOG.E ("Test", "package =" +pkgname+ ", arg1 =" +arg1 "); Intent Intent =null;intent = Getpackagemanager (). Getlaunchintentforpackage (Pkgname); if (intent! = null) {startactivity (intent);} return true;} Elsereturn super.shouldoverrideurlloading (view, URL);}); Mwebview.loadurl ("http://***************/testapp.html");}
Click Open QQ, if you have QQ installed on your phone, you can start up.
Android launches app via web