我这里有个奇怪的问题。这适用于三星s4(I9500),而不适用于Moto G (XT1040)。
清单:
<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="XXX" />
</intent-filter>
<intent-filter android:label="XXX">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="XXX" android:host="me" />
</intent-filter>链接: android-app://com.mypackage/XXX/me
当我尝试进入这个链接时,当我使用Moto G时,它会转到第一个过滤器。s4转到预期的过滤器(第二个)。
在我的活动中,我有这样的东西:
@Override
public void onStart() {
super.onStart();
Intent intent = getIntent();
if (intent != null) {
String action = intent.getAction();
Uri data = intent.getData();
checkDeepLinking(action, data);
}
}我调试了一下,发现intent.getdata()是"XXX:“而不是"XXX://me”。
谢谢!
发布于 2015-11-10 20:09:00
您是否可以使用谷歌在其文档(https://developers.google.com/app-indexing/android/test)中提供的工具来测试您的实现,然后在此处发布所获得的日志详细信息和结果?
根据文档,您应该始终在您的清单中显示android:host参数,所以这可能是一个问题。另外,这两款移动设备的Android和Google Search App版本是否相同?
干杯。
https://stackoverflow.com/questions/33399384
复制相似问题