I know how to load a PDF file in Android. But if more than one PDF viewers are installed, Android shows a list to choose from. I want to load my PDF file with a specific PDF viewer (say DroidReader). How to do this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Then specify the complete name of the activity:
To know what the package name and activity are, you could take a look at the
adb logcatoutput: when you open an activity it gets logged there. And, of course, configure the intent correctly so that the DroidReader know what file to open.Lastly, but important, you should surround the
startActivitymethod with atry-catchblock catching theActivityNotFoundException(I’m sure that most of the handsets won’t have that specific app).