Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

What is the function of an IntentFilter


An intent filter is an expression in an app's manifest
file that specifies the type of intents that the component
would like to receive.  When you create an implicit intent, the
Android system finds the appropriate component to start by
comparing the contents of the intent to the intent filters declared
in the manifest file of other apps on the device. If the
intent matches an intent filter, the system starts that component
and delivers it the Intent object.


<activity android:name=".HelloWorld"
    android:label="@string/app_name">
    <intent-filter>
        <action android:name="android.intent.action.VIEW"/>
        <category android:name="android.intent.category.DEFAULT"/>
        <category android:name="android.intent.category.BROWSABLE"/>
        <data android:scheme="http" android:host="androidium.org"/>
    </intent-filter>
</activity>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #What #function #IntentFilter
ADD COMMENT
Topic
Name
5+2 =