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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:15:41+00:00 2026-05-30T07:15:41+00:00

I am working on an app which downloads the pdf from the server and

  • 0

I am working on an app which downloads the pdf from the server and stores it. Then I use another application like repligo reader to read the pdf from my app.

I wanted to know that is there any way that the pdf files could be stored in a way that no other application could read the file . The file is read only when it is used from my app.
Is there any way?Please help

  • 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-30T07:15:43+00:00Added an answer on May 30, 2026 at 7:15 am

    (As per my knowledge) I think for this you have to store your downloaded pdf file in application’s internal package,
    /data/data/<package_name>files, and you have to read this file through third party pdf readers. For this you have to store this file with permission as MODE_WORLD_READABLE so pdf file is stored in your application’s package and you can read it with third party pdf reader. Also its placed in internal storage so not other application can easily access it (except root device).

    The code for write files,

    FileOutputStream fos = openFileOutput(pdfFileName, Context.MODE_WORLD_READABLE);
    fos.write(pdfAsBytes);
    fos.close();
    

    EDIT:

    To view PDF file I used,

    File file = new File("/data/data/<package_Name>/files/pdffile");
    Uri path = Uri.fromFile(file);
    Intent pdfIntent = new Intent(Intent.ACTION_VIEW);
    pdfIntent.setDataAndType(path, "application/pdf");
    pdfIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
    try
    {
      startActivity(pdfIntent);
    }
    catch(Exception e)
    {
      Log.e("Activity Not Found Exception",e.toString());
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a phonegap iPhone app which downloads content from the network in
I am working on a blackberry app in which I got a pdf-url from
I'm working on an app that downloads meta tags from websites and saves then.
I am currently working on an iPhone magazine application which downloads its magazine content
I'm working on an app that downloads a zipped rss feed and then unzips
I'm working on an application that downloads some data from the internet using NSData's
I'm working on the app which should download some data form server (done) and
i am working on app which deals with proximity alerts. I can add proximity
I am working on an app which calls a rest web service. Sometimes the
I am working on an app which uses Commonslang.jar libraries. I was trying 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.