1
數據值
我在AndroidManifest.xml中的getData()返回null,當有在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
任何想法爲什麼?