Skip to content

Database Management

As KitabooSdk provides an offline support as well,Accordingly KitabooSdk facilitate a local storage/database which exist within SDK and allow you (developer)to store the each type of data which KitabooSdk supports(ie, Highlight,contextual note, Sticky note,bookmark,pen etc).

However, User (Developer) can create their own storage/database which will not be a part of KitabooSdk and though it can be utilised to store/fetch the Reader data( data available on book page) to support the app in offline mode.

By Default, KitabooSdk supports a local storage called "KitabooDb.db " to store/update/fetch the book page data.

Database interaction:

  • Get an instance of KitabooSdk local storage

    A class "DatabaseManager" supported KitabooSdk will help you to interact with database( KitabooSdk local storage) by exposing an instance of the class "DatabaseManager" in the following and way can perform an Db operation as the data category.

DatabaseManager.getInstance(context);

where, context is the calling class context who want to interact to database.

  • Once you get the instance of "DatabaseManager" you can perform CURD operation to the respective tables acoordingly
DatabaseManager.getInstance(PlayerActivity.this).updatePenMarkers(tmpItem, userID,bookId);