Select PDF file from my gallery

Asked

Viewed 599 times

0

Good Afternoon I am trying to select a pdf file from my gallery but it returns me the following message : "Impossible to locate application to perform this action")

Android version 4.1.2

I’m using the following code :

private void showFileChooser() {
    Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
    intent.setType("application/pdf");
    intent.addCategory(Intent.CATEGORY_OPENABLE);

    try {
        startActivityForResult(
                Intent.createChooser(intent, "Select txt file"),
                0);
    } catch (android.content.ActivityNotFoundException ex) {
        // Potentially direct the user to the Market with a Dialog

    }
}
  • The device has some application that can open PDF’s?

  • Yes! in Adobe!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.