安卓Scheme协议的使用详解


<activity android:name="com.example.myapplication.scheme.SchemeActivity"
            android:exported="true">
            <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:scheme="testsq"
                    android:host="poeer"
                    android:port="9999"
                    android:path="/ddsdddssd"
                    />
            </intent-filter>
        </activity>


zymobi://3g2win:9999/macthDetail?macthId=222&time=10001
scheme :代表该Schema 协议名称zymobi
host: 代表Schema作用于哪个地址域  3g2win
port:; 代表该路径的端口号9999
path 代表Schema指定的页面  /macthDetail
-- 代表传递的参数  ?macthId=222&time=10001



   Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("testsq://poeer:9999/ddsdddssd"));
                startActivity(intent);

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容