返回工具箱
Intent Test

AIbangOS

Intent Test跳转测试

逐个测试哪种方案能在你的设备上正常跳转。请打开 ADB 日志抓取报错信息。

01

方案一:Fragment 跳转

使用 ZybSettings + MyDeviceInfoFragment,标准 Fragment 分发入口。

通用入口-JS
通用入口-YS
JS 使用 .ZybSettingsYS 使用 .zyb.ZybSettings
component=com.android.settings/.ZybSettings
fragment=com.android.settings.deviceinfo.MyDeviceInfoFragment
02

方案二:SubSettings 入口

使用 SubSettings 作为通用容器,搭配同一 Fragment。两个版本 URI 相同。

通用入口-JS
通用入口-YS
通用 两个版本 URI 相同,选任意一个即可
component=com.android.settings/.SubSettings
fragment=com.android.settings.deviceinfo.MyDeviceInfoFragment
03

方案三:Activity 直跳

直接调用 Settings$MyDeviceInfoActivity,绕过 Fragment 分发机制。

component=com.android.settings/.Settings$MyDeviceInfoActivity
04

方案四:完整 Intent 参数

增加 actioncategory,模拟系统快捷方式的完整 Intent。

action=android.intent.action.MAIN
category=com.android.settings.SHORTCUT
component=com.android.settings/.Settings$MyDeviceInfoActivity
05

方案五:SETTINGS Action

使用 com.android.settings.action.SETTINGS action 配合 Fragment 参数。

action=com.android.settings.action.SETTINGS
fragment=com.android.settings.deviceinfo.MyDeviceInfoFragment
测试时请打开 ADB 日志抓取,把报错信息发给开发者。推荐使用 Via、悟空浏览器、今日头条、夸克。