Skip to main content

Posts

Showing posts with the label java android tutorial

Activities with same intent filter name

Watch this on YouTube View part 2 We already learn that, an intent filter is necessary for invoking an activity using intent object. Assume that  there is more than one activities present with same intent filter name. In this post i am going to explain this situation with a complete working example. If there is more than one activities with same intent filter name, than the android system will show a dialog window that prompt you to choose an appropriate activity to complete the action.    In this example there are two activities SecondActivity and ThirdActivity with same intent filter name as "common_filter". The manifest code segment for this activities are shown bellow.  1: <activity 2: android:name="com.testdemo.SecondActivity" 3: android:label="@string/title_activity_second" > 4: <intent-filter> 5: < action android:name="common_filter" /> 6: <category android:name="android...