Intent Filter In Android Studio SEND ACTIVITY RECIVERS

steps to accept send action form other activities or other Application to recive specificic pdf type of file are :--

 

Read the Steps Carefully :-  

 

1. Copy the Below Code From the browser as Plain Text.

 <intent-filter>

    <category android:name="android.intent.category.DEFAULT"/>
<action android:name="android.intent.action.SEND"/>
<data android:mimeType="application/pdf"/>

</intent-filter>
 

code detail :

 

category : is generally specifies the category of the action which id default in genral case.

action : is generally is the type of action on which you want to recive intent .

data : data is the type of file you want to accept.

intent filter : is the filter for the other application to know what are you accepting . 

 

 

2. open the Android Studio Application .

3. Now Open the Project on Which you want to implement the code and allow the application to recive the intent

4. wait for the gradle to sync the project if faild try gradle reimport option.

5. wait for a successful build of the project .

6. now from the left navigation brows for android files .

7. open the manifest files of the project from here .

8. now select the activity on which you want to implement this code .

9. for example  if my activity is MainActivity it might be written as

< activity name = ".Mainactivity" />

10. change it as 

< activity name = ".MainActivity"> 

//Place Here 

 </activity>

11.  now in the place of place here paste the copied code .

12. Run the Project and test it .

 

Comments