Hi i am learning android application development. What i am stuck in my current project is i don know how to receive pdf file sent or shared from other applications. I see many apps can do this task. Please teach me...
Ok, first you have to add read external storage permission in androidmanifest.xml file.
Then in the androidmanifest file in the Activity tag, you add an intent-filter as shown below. There are two actions are specified. The first action (SEND) allows your app to receive a pdf file sent from another application. The second action (VIEW) allows the application to view receive a pdf file that is selected from file explorer. You need to put "application/pdf" as mine type.
Finally in your code, you get path of the pdf file as shown below:
This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages: