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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:53:49+00:00 2026-05-29T10:53:49+00:00

In the recently updated Android Dev Guide, the documentation for Content Providers contains a

  • 0

In the recently updated Android Dev Guide, the documentation for Content Providers contains a section titled Contract Classes. Though there is a link to an example for Contacts, it was not immediately clear what is a Contract Class and how do I create one for my custom Content Provider

Would appreciate some help on this.

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-29T10:53:50+00:00Added an answer on May 29, 2026 at 10:53 am

    A contract class defines constants that help applications work with
    the content URIs, column names, intent actions, and other features of
    a content provider. Contract classes are not included automatically
    with a provider; the provider’s developer has to define them and then
    make them available to other developers.

    You can make your own Contract class and define some constants there. For example, column names that you can later call in code that makes queries to the database etc.

    Nice example how Contract class is used see this thread Android – How do I load a contact Photo?

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

Sidebar

Related Questions

I recently updated the Android SDK on the Jenkins machine to rev15 from rev13,
I have recently updated my Android SDK to include support for Android 2.2 (API
I updated the ADT plugin recently and my entire Eclipse-Android build system stopped working.
I have recently uploaded two apps on the android market, with one already there
I recently updated my eclipse installation with which I develop my Android apps. Soon
I recently updated my nexus one to Android 2.3.3 and now I am unable
We recently updated our Tomcat web service. The only things we really updated were
I recently updated to the new version of XCode and the session start code
I recently updated my Eclipse (now running 20100218-1602), and I've found whenever I click
I recently updated an application from VS2003 to VS2008 and I knew I would

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.