-
Notifications
You must be signed in to change notification settings - Fork 77
Home
- See README document
-
'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
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" />
-
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
There are also core unit tests you may find useful
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
<dependency>
<groupId>com.novoda</groupId>
<artifactId>sqliteprovider</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
- TODO
- Android SQLiteProvider Library Project is licensed under Apache 2