Start the mobile app with the JS code of the Web page

Source: Internet
Author: User

<spanstyle= "FONT-SIZE:18PX;"><Script>functionStartAPP () {window.location= "scheme name://**.**/**";}functionDownloadapp () {window.location= "http://ip/**/**.apk";}</Script><styletype= "Text/css">Body{background:#D2D460;text-align:Center;Margin-top:10%}Div{width:100%;margin:0 Auto;background:#fff;text-align: Left;}</style></Head><Body><?php $var _name = $_get["isappinstalled"), if ($var _name== "1") {echo ' </img> ';} else if ($var _name== "0") {echo ' </img> ';} else{Echo ' </img> ';}?></Body></span>

The following settings are required in the app (typically in the Manifest.xml file's activity's intent filter)

<spanstyle= "FONT-SIZE:18PX;"><Intent-filter>               <ActionAndroid:name= "Android.intent.action.VIEW" />               <categoryAndroid:name= "Android.intent.category.DEFAULT" />               <categoryAndroid:name= "Android.intent.category.BROWSABLE" />               <DataAndroid:scheme="**"//scheme name ' tencentqq ' Android:host="**.**"Android:pathprefix="/**">         </Data></Intent-filter></span>

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.