This might be a very stupid question, but I am not quite clear on the answer.
- My implicit intent contains an action, data & category (optional), which I pass while sending the intent either through startActivity or startService.
something like this we normally do,
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(android.content.Intent.EXTRA_TEXT, "Standing on the Moon!");
startActivity(intent);
and then we have the same operation done in a different way, using an intent filter in manifest file like
<activity android:name="ShareActivity">
<intent-filter>
<action android:name="android.intent.action.SEND"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="text/plain"/>
</intent-filter>
</activity>
My question - is both the way to declare this is for the same purpose, the two different ways they are declared, does they hve different significance???