Call up the local app with a URI

Source: Internet
Author: User

1. Configure in the Android local app manifest file

<activity            android:name= "com.mdj.ui.WelcomeActivity"            android:screenorientation= "Portrait            " Android:theme= "@android: Style/theme.black.notitlebar.fullscreen" >            <intent-filter>                <action Android:name= "Android.intent.action.MAIN"/>                <category android:name= "Android.intent.category.LAUNCHER" />            </intent-filter>            <!--use URI to call app--            <intent-filter>                <action android: Name= "Android.intent.action.VIEW"/>                <category android:name= "Android.intent.category.DEFAULT"/>                <category android:name= "Android.intent.category.BROWSABLE"/>                <data                    android:host= " Com.mdj.ui "                    android:scheme=" Mdj "/>            </intent-filter></activity>
Attention:

The schema must all be lowercase letters. and can't have numbers.

Host is also a lowercase letter

2 . Write a simple HTML page


3. Mobile browser opens HTML directly


4. Assume that you need to pass the URI to participate. Change the HTML directly to

5, in the application of the call to get

Uri uri = getintent (). GetData ();

String test1= uri.getqueryparameter ("arg0");

String test2= uri.getqueryparameter ("arg1");


Call up the local app with a URI

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.