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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:29:43+00:00 2026-06-11T07:29:43+00:00

I have a content provider and a test application both signed with a debug

  • 0

I have a content provider and a test application both signed with a debug key. The client receives a content normally if permissions are not applied, but I want to apply permissions to the stuff. So the following lines are added into the content provider’s manifest file:

  <permission android:name="org.example.provider.READ"
    android:permissionGroup="org.example.group.DATA_ACCESS"
    android:label="@string/readonlyaccess"
    android:protectionLevel="signature" />

  <application
    ...
    <provider android:name=".ImageContentProvider"
        android:authorities="org.example.provider"
        android:readPermission="org.example.provider.READ" />

In the client’s manifest file the following line is added:

<uses-permission android:name="org.example.provider.READ" />

When I try to get the data from the provider, I get the error:

09-13 22:38:20.995: E/AndroidRuntime(13979): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.hello/com.example.hello.HelloActivity}: java.lang.SecurityException: Permission Denial: reading org.example.ImageContentProvider uri content://org.example.provider/file from pid=13979, uid=10040 requires org.example.provider.READ

Am I missing something, or is it related to the fact that the applications are signed by debug key? How to solve the problem? I saw a suggestion to add uses-permission to the provider as well, but this does not help either. NB. This is checked inside emulator, if this can be of any importance.

I found a related question throws SecurityException when signing with the default debug keystore, but it does not provide actual solution.

  • 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-11T07:29:44+00:00Added an answer on June 11, 2026 at 7:29 am

    Yes, it works with debug keystores, at least the last time I tried it.

    I would have the <permission> element in both apps. If you installed the <uses-permission> one first, and then installed the <permission> one, you would run into problems. The permission needs to be defined before the <uses-permission> is encountered, and the simplest way to do that is to put the <permission> in both.

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

Sidebar

Related Questions

I have my own custom Content Provider that loads a database which contains the
I have to get a part of my content provider query in a String[]
Do both these files have the same content? Or do they provide different functionality
I have content on a webpage which is both sent from the server at
I have written my content provider supposed to wrap access to 2 tables in
In my application I am implementing the Push Notification Service. I have a Content
When I try to run my application from the WCF Test Client I receive
I have created very simple app with persistence context (hibernate as provider) to read
I have content on my page in boxes. They are displayed like this. Box1
I have content loaded into a hidden iframe on a page and I'm wanting

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.