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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:01:49+00:00 2026-05-26T11:01:49+00:00

I have an application with a built-in widget and I’m trying to read an

  • 0

I have an application with a built-in widget and I’m trying to read an image from my package folder (/data/data/com.package.name/pic.jpg) via my widget, but when I try to read it I get “Permission denied” in logcat. file.canRead() returns true so I’m not really sure what’s wrong here. Isn’t it allowed to read from the package folder via a widget?
Do I have to create the image on the sdcard to be able to read it or is there another way? I would prefer to read it from my package folder but it doesn’t seem to work.
Any ideas?

Thanks

  • 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-26T11:01:49+00:00Added an answer on May 26, 2026 at 11:01 am

    I am going to assume that by “widget” you really mean “app widget”. If my assumption is incorrect, please ignore this answer. 🙂

    The home screen needs to be able to read the image. The home screen runs in its own process and does not have rights to any of your files.

    Isn’t it allowed to read from the package folder via a widget?

    The home screen is not allowed to read from your app’s files. So, if you are using setImageViewUri() with a file:// Uri, that would be your problem.

    Do I have to create the image on the sdcard to be able to read it or is there another way?

    External storage would be one solution. Another would be to create the file using openFileOutput() using MODE_WORLD_READABLE. Yet another would be to create a tiny ContentProvider and use a content:// Uri.

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

Sidebar

Related Questions

I have a Windows Form application built on a data model and a Windows
I have a client application built in C# which sends an image along with
I have an application built with Maven 2 with duplicate dependencies from both SpringSource
I have an application built for iPhone 2.0 but I would like to use
I have an application built for 1.5 and I am adding higher resolution drawables
I have a Winform application built with C# and .Net 2.0. I have a
I have a WinForm application built with VS 2008 (C#) and SQL Server Express
I have a cakePhp application built, and now I'm creating a simple blog based
I have this typical scenario. I have a smartclient application built on .net 2.0
I think I am at a impasse here. I have an application I built

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.