ContentProviderGeneration
Getting Started
Placeholder ContentProvider
@ContentProvider(authority = TestContentProvider.AUTHORITY,
database = TestDatabase::class,
baseContentUri = TestContentProvider.BASE_CONTENT_URI)
object TestContentProvider {
const val AUTHORITY = "com.dbflow5.test.provider"
const val BASE_CONTENT_URI = "content://"
}@ContentProvider(authority = TestDatabase.AUTHORITY,
database = TestDatabase::class,
baseContentUri = TestDatabase.BASE_CONTENT_URI)
@Database(name = TestDatabase.NAME, version = TestDatabase.VERSION)
abstract class TestDatabase: ContentProviderDatabase() {
companion object {
const val NAME = "TestDatabase"
const val VERSION = 1
const val AUTHORITY = "com.dbflow5.test.provider"
const val BASE_CONTENT_URI = "content://"
}
}Adding To Manifest
Adding endpoints into the data
Connect Model operations to the newly created ContentProvider
Interacting with the Content Provider
Advanced Usage
Notify Methods
Example
ContentUri Advanced
Path Segments
Last updated
Was this helpful?