A contract class is a static class that contains definitions of constants for Uris, column names, MIME types, and other metadata of the provider. This class establishes a contract between the provider and other applications, so that the provision can be accessed correctly even if the actual Uri, column name, and so on are changed.
Contract classes are also helpful to developers, because their constants all help to remember the name, so for column names or Uris developers rarely use wrong values. Because it is a class, it can contain javadoc documents. The integrated development environment (such as Eclipse) can automatically name constants from contract classes and display javadoc to corresponding constants.
Developers cannot access the class files of contract classes from your applications, but they can statically compile a. jar file from your provided to their applications.