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 7060949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:24:52+00:00 2026-05-28T04:24:52+00:00

I have downloaded some Office files(doc, xls, pdf etc) on SDcard from FTP server

  • 0

I have downloaded some Office files(doc, xls, pdf etc) on SDcard from FTP server and now I want to view those files using third party application.

I am using below code for Intent (in this case a PDF File):

PackageManager packageManager = getPackageManager();
        Intent intent = new Intent(Intent.ACTION_VIEW);
        intent.setType("application/pdf");


        List list = packageManager.queryIntentActivities(intent,PackageManager.MATCH_DEFAULT_ONLY);


        if (list.size() > 0) 
        {
            Uri uri_path = Uri.parse(path);
            intent.setDataAndType(uri_path, "application/pdf");
            try
            {
                startActivity(intent);
            } 
            catch (ActivityNotFoundException e)
            {
                Toast.makeText(getApplicationContext(),"No Application Available to View PDF", Toast.LENGTH_SHORT).show();
            }
        }

But when I try to open the file a White Screen appears and disappears. And in DDMS I get the following:

01-14 16:14:17.900: ERROR/Quickoffice(1204): java.lang.NullPointerException
01-14 16:14:17.900: ERROR/Quickoffice(1204):     at s.a(Unknown Source)
01-14 16:14:17.900: ERROR/Quickoffice(1204):     at com.qo.android.quickcommon.OfficeActivity.a(Unknown Source)
01-14 16:14:17.900: ERROR/Quickoffice(1204):     at com.qo.android.quickcommon.OfficeActivity.a(Unknown Source)
01-14 16:14:17.900: ERROR/Quickoffice(1204):     at com.qo.android.quickword.Quickword.onCreate(Unknown Source)
01-14 16:14:17.900: ERROR/Quickoffice(1204):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
01-14 16:14:17.900: ERROR/Quickoffice(1204):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1715)
01-14 16:14:17.900: ERROR/Quickoffice(1204):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1767)
01-14 16:14:17.900: ERROR/Quickoffice(1204):     at android.app.ActivityThread.access$1500(ActivityThread.java:122)
01-14 16:14:17.900: ERROR/Quickoffice(1204):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1005)
01-14 16:14:17.900: ERROR/Quickoffice(1204):     at android.os.Handler.dispatchMessage(Handler.java:99)
01-14 16:14:17.900: ERROR/Quickoffice(1204):     at android.os.Looper.loop(Looper.java:132)
01-14 16:14:17.900: ERROR/Quickoffice(1204):     at android.app.ActivityThread.main(ActivityThread.java:4028)
01-14 16:14:17.900: ERROR/Quickoffice(1204):     at java.lang.reflect.Method.invokeNative(Native Method)
01-14 16:14:17.900: ERROR/Quickoffice(1204):     at java.lang.reflect.Method.invoke(Method.java:491)
01-14 16:14:17.900: ERROR/Quickoffice(1204):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
01-14 16:14:17.900: ERROR/Quickoffice(1204):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
01-14 16:14:17.900: ERROR/Quickoffice(1204):     at dalvik.system.NativeStart.main(Native Method)

Please help me on this issue. I don’t understand the problem. When I goto SDCard using “ES File Explorer” and opens the file, it gets opened. All the files(doc xls and PDF) gets opened correctly.

  • 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-05-28T04:24:53+00:00Added an answer on May 28, 2026 at 4:24 am

    Got my answer. I needed to add the following for my URI:

    File file = new File(path);
    Uri uri_path = Uri.fromFile(file);
    intent.setDataAndType(uri_path, "application/pdf");
    try
    {
        startActivity(intent);
    } 
    catch (ActivityNotFoundException e)
    {
        Toast.makeText(getApplicationContext(),"No Application Available to View PDF", Toast.LENGTH_SHORT).show();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have downloaded some files from the internet related to a particular topic. Now
I have a small app that downloads some files from a remote (HTTP) server
We have a C# application that connects to a FTP server, downloads some files,
I have downloaded source code for some software from svn on Linux and want
have downloaded Orca to edit an MSI file. I want to remove some banner
I have a project that depends upon some other binaries to be downloaded from
I have a configuration question about SVN. I have downloaded some code from a
I have downloaded the Kohana Pagination module from Git and have been having some
I have some demos that I downloaded and they come with a Makefile.win and
We have an application that downloads some files in the background. Our application pops

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.