Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8784855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:12:33+00:00 2026-06-13T21:12:33+00:00

I want to open pdf file which i have already downloaded on my sd

  • 0

I want to open pdf file which i have already downloaded on my sd card. But while opening that file through Intent It gives me error as No activity found to handle this intent. I want to open pdf in my application through pdf reader or any other way. Suggest me better solution to open pdf if possible.

    PackageManager packageManager = getPackageManager();
    Intent pdf= new Intent(Intent.ACTION_MAIN);
                                    pdf.addCategory("android.intent.category.LAUNCHER");
                                    pdf.setPackage("com.adobe.reader");
                                    pdf.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                                    pdf.setDataAndType(Uri.fromFile(pdfPath),"application/pdf");
pdf.setData(Uri.parse( Environment.getExternalStorageDirectory().toString() + "/downloadedfile.pdf"));

Please help me with this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T21:12:34+00:00Added an answer on June 13, 2026 at 9:12 pm

    Hey I found solution here it is.. I am opening it in Adobe pdf reader. If adobe reader is not installed i am redirecting to google play.

    private void viewPdf(Uri file){
        Intent intent;
        intent = new Intent(Intent.ACTION_VIEW);
        intent.setDataAndType(file, "application/pdf");
        try{
        startActivity(intent);
        }catch(ActivityNotFoundException e){
        AlertDialog.Builder builder = new AlertDialog.Builder(getApplicationContext());
        builder.setTitle("No Application Found");
        builder.setMessage("Download from Android Market?");
        builder.setPositiveButton("Yes, Please", new DialogInterface.OnClickListener() {
    
        @Override
        public void onClick(DialogInterface dialog, int which) {
        // TODO Auto-generated method stub
    
        Intent marketIntent = new Intent(Intent.ACTION_VIEW);
        marketIntent.setData(Uri.parse("market://details?id=com.adobe.reader"));
        startActivity(marketIntent);
    
        }
        });
        builder.setNegativeButton("No, Thanks", null);
        builder.create().show();
    
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to open pdf file in webview but the scenario is different here,
I have a iframe that i want to open pdf's into from a list
So I have these buttons in my app that I want to open .PDF
I have a file open in Emacs which highlights the syntax and I want
want to open pdf file when a user clicks on hyperlink shown in gridview
I have files(pdf,doc,txt,xsl,etc..) stored in my mongo *db*. I want to retrieve and open
I have a very simple pure html file in which I have many PDF
I want to open a pdf file, then save it as a text and
I want to be able to open a pdf file from my application without
I have a NSMutableData object which contains a PDF file. I know how to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.