Class DefaultDatabaseProvider

    • Constructor Detail

      • DefaultDatabaseProvider

        public DefaultDatabaseProvider​(SQLiteOpenHelper sqliteOpenHelper)
        sqliteOpenHelper - An SQLiteOpenHelper from which to obtain database instances.
    • Method Detail

      • getWritableDatabase

        public SQLiteDatabase getWritableDatabase()
        Description copied from interface: DatabaseProvider
        Creates and/or opens a database that will be used for reading and writing.

        Once opened successfully, the database is cached, so you can call this method every time you need to write to the database. Errors such as bad permissions or a full disk may cause this method to fail, but future attempts may succeed if the problem is fixed.

        Specified by:
        getWritableDatabase in interface DatabaseProvider
        A read/write database object.