我的 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 i = currentActivity.getIntent();
Log.d("Logging", "i.getAction() is " + i.getCategories());
Log.d("Logging", "i.getAction() is " + i.getAction());
Log.d("Logging", "i.getData() is " + i.getData());
Log.d("Logging", "scheme is " + i.getScheme());
我得到了这个:
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
有什么想法为什么?