当AndroidManifest.xml中存在数据值时,getData()返回null
我的AndroidManifest.xml中有这个当AndroidManifest.xml中存在数据值时,getData()返回null,android,android-intent,Android,Android Intent,我的AndroidManifest.xml中有这个 <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> <data android:scheme="http"/> </intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<data android:scheme="http"/>
</intent-filter>
我把这个拿回来了:
D/Logging( 5050): i.getAction() is [android.intent.category.LAUNCHER]
D/Logging( 5050): i.getAction() is android.intent.action.MAIN
D/Logging( 5050): i.getData() is null
D/Logging( 5050): scheme is null
你知道为什么吗 您应该尝试在您的数据中指定android:host=somehost.com,该方案本身没有任何意义,可能会被跳过和忽略,如果您在没有方案的情况下指定url/host,也会被忽略
D/Logging( 5050): i.getAction() is [android.intent.category.LAUNCHER]
D/Logging( 5050): i.getAction() is android.intent.action.MAIN
D/Logging( 5050): i.getData() is null
D/Logging( 5050): scheme is null