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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:59:00+00:00 2026-05-20T12:59:00+00:00

This might be a simple question, but I’ve had a hard time pinning down

  • 0

This might be a simple question, but I’ve had a hard time pinning down a direct answer.

I have created a content provider in its own separate package in a project using the Eclipse Android ADT. This package is included in the src of the overall project. When modifying AndroidManifest.xml I included this as a child of <application>:

 <provider android:name="JobProvider"
      android:authorities="dsndata.sds2Mobile.provider.JobProvider" />

The code that will be using the provider is in a separate package also in src

Where would be the best place to store the provider? In the same package as the source using it? Also, What are the correct values for android:name and android:authorities? I’m sure they vary depending on where the provider is stored.

  • 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-20T12:59:01+00:00Added an answer on May 20, 2026 at 12:59 pm

    You can place the provider wherever you like. If you are writing a provider that stores data for your app (and only for your app, and only your app uses it) then it’s cleanest to just be right in with the app code in its own package. Typically, ‘provider’ is the package name.

    As for the name and authority, see the Manifest documentation:

    android:name The name of the class
    that implements the content provider,
    a subclass of ContentProvider. This
    should be a fully qualified class name
    (such as,
    “com.example.project.TransportationProvider”).
    However, as a shorthand, if the first
    character of the name is a period, it
    is appended to the package name
    specified in the element.
    There is no default. The name must be
    specified.

    android:authorities A list of one or
    more URI authorities that identify
    data under the purview of the content
    provider. Multiple authorities are
    listed by separating their names with
    a semicolon. To avoid conflicts,
    authority names should use a
    Java-style naming convention (such as
    com.example.provider.cartoonprovider).
    Typically, it’s the name of the
    ContentProvider subclass. There is no
    default. At least one authority must
    be specified.

    The content authority is a unique string that is used to map content:// uris (uri to data) to your class. ContentResolver uses that mapping to identify how to serve a given request, which is identified with a URI, to the correct class (yours). Hence the requirements for a unique string.

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

Sidebar

Related Questions

This might be a simple question to answer, but I couldn't find the answer.
This might seem like a simple question. But I have been looking for an
this might be a simple question, but as I have zero experience in C++
This might be a simple question but I'm just picking this up so please
This might be a simple question, but i can't seem to grasp it. I
Sorry this might be a simple question, but I could not figure it out.
This might be an overly simple question, but I am a beginner at programming
I think this might be a pretty simple question, but I haven't been able
This might be a simple question, but I've been looking around and can't find
This might seem a simple question but I've been trying for a couple of

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.