您好,欢迎来到伴沃教育。
搜索
您的当前位置:首页android.net.Uri及scheme://host:po

android.net.Uri及scheme://host:po

来源:伴沃教育

2017-11-09 遇到的一点小问题

.
Uri uri = 
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
//Intent intent = new Intent();
//intent.setAction(Intent.ACTION_VIEW);
//intent.setData(uri);
startActivity(intent)

AndroidManifest.xml添加接收跳转的条件判断就可以。
不过要注意:
跳转

<intent-filter>
   <data
        
        android:path="/${WANNOO_KEY}"
        android:scheme="wannoo"/>
    <action android:name="android.intent.action.VIEW"/>
    <category android:name="android.intent.category.DEFAULT"></category>
    <category android:name="android.intent.category.BROWSABLE"></category>
</intent-filter>

和 启动页

<intent-filter>
    <action android:name="android.intent.action.MAIN"/>
    <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>

Copyright © 2019- bangwoyixia.com 版权所有 湘ICP备2023022004号-2

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务