Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.
blundell edited this page Dec 3, 2012 · 29 revisions

Welcome to the SQLiteProvider wiki!

SQLiteProvider Usage

This project is made of three modules:

  • 'core' - holding the actual library code for you to use

  • 'acceptance' - this is an Android acceptance test project with tests related to the core

  • 'demo' - an Android project showing a demonstration of the various uses of the core library

Quick Start:

1 ) Create a content provider that extends novoda.lib.sqliteprovider.provider.SQLiteContentProviderImpl

2 ) Add an authority to that provider

 import novoda.lib.sqliteprovider.provider.SQLiteContentProviderImpl;

 public class FireworkProvider extends SQLiteContentProviderImpl {

     public static final String AUTHORITY = "content://com.novoda.demo/";

 }

3 ) Register your provider with the Android System in your AndroidManifest

 <provider
  android:name="com.novoda.sqliteprovider.demo.provider.FireworkProvider"
  android:authorities="com.novoda.demo"
  android:exported="false" />
  1. Use the content provider with a URI to query your database

    Context.getContentResolver().query(Uri.parse("content://com.novoda.demo/fireworks/1"));

The above would return you a Cursor pointing to the row in the fireworks table with the primary key of 1

If you get stuck refer to the demo project or the acceptance tests.

There are also core unit tests you may find usefull

The status of the build can be seen here: SQLiteProvider on Jenkins

The Sonar build health (static code analysis) can be seen here: SQLiteProvider on Sonar

Adding SQLiteProvider to your Maven project

  1. TODO

Licensing

  • Android SQLiteProvider Library Project is licensed under Apache 2
Clone this wiki locally