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

  • Home
  • SEARCH
  • 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 8777269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:14:28+00:00 2026-06-13T19:14:28+00:00

I made an application an year ago and I used this code to download

  • 0

I made an application an year ago and I used this code to download a page to local file and then open it in browser intent:

FileOutputStream fos = openFileOutput("summary.html", Context.MODE_PRIVATE);
fos.write(msg.obj.toString().getBytes());
fos.close();
Intent i = new Intent(Intent.ACTION_VIEW);
i.setDataAndType(Uri.fromFile(getFileStreamPath("summary.html")),"text/html");
startActivity(i);

And it worked at the time. Now I had to pick up the application again and this no longer works.
In the browser intent window I get a

Web Page not available
The webpage at file://…. could not be loaded (etc etc)

I’m still running with the same android version I did in the beginning (2.1), so it’s not related to the deployed OS version. But the SDK has been updated since then, maybe something changed?

If I switch from MODE_PRIVATE to MODE_WORLD_READABLE it works, but doesn’t the intent run with same userid as calling application?

Any option on how to do this and keep the file in MODE_PRIVATE?

And any information on what might have changed for this to happen? I have googled and found nothing…

  • 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-13T19:14:29+00:00Added an answer on June 13, 2026 at 7:14 pm

    And it worked at the time

    I find that very difficult to believe.

    But the SDK has been updated since then, maybe something changed?

    No, apps have always run in their own process, with their own user ID, and therefore no other apps can access your MODE_PRIVATE files.

    If I switch from MODE_PRIVATE to MODE_WORLD_READABLE it works, but doesn’t the intent run with same userid as calling application?

    No, for any likely definition of your phrase “intent run”. Each app runs in its own process, under its own user ID.

    Any option on how to do this and keep the file in MODE_PRIVATE?

    Display it yourself in a WebView.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A year ago I made few small steps in node. Even then there was
I have made this post over a year ago, and I think it makes
Last year, I made an application in Java using PDFBox to get the raw
I made an application that passes trough an XML file and extracts the entries
I made an application in NetBeans and I used the Apache Commons IO jar
I have made an application for IPad in objective C. In this I am
About half a year ago, I started digging into unit testing. I made my
I started this website last year, along with a facebook page. http://www.facebook.com/textbookcentral I just
I have made application where i run to get html of a page,when i
Last year I made an Android application that scrapped the informations on my train

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.