浏览器启动android应用

window.location.href = "xl://com.caho.app:8888/app?name=chao";
<activity>
        <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.chao.app"
                    android:path="/app"
                    android:port="8888"
                    android:scheme="xl" />
            </intent-filter>
</activity>

 

Uri uri = getIntent().getData();
uri.getQueryParameter("name");//获取参数

 

posted @ 2018-07-19 14:33  荣超  阅读(307)  评论(0编辑  收藏  举报