Skip to content

Latest commit

 

History

History

rooms-database

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Integrate Rooms Database Plugin in your application

Add Gradle Dependencies

Pluto Rooms Database is distributed through mavenCentral. To use it, you need to add the following Gradle dependency to your build.gradle file of you android app module.

Note: add the no-op variant to isolate the plugin from release builds.

dependencies {
  debugImplementation "com.plutolib.plugins:rooms-db:$plutoVersion"
  releaseImplementation "com.plutolib.plugins:rooms-db-no-op:$plutoVersion"
}

Install plugin to Pluto

Now to start using the plugin, add it to Pluto

Pluto.Installer(this)
  .addPlugin(PlutoRoomsDatabasePlugin())
  .install()

Start watching Rooms Database

Create intance of DataStore Preferences and start watching in Pluto.

// DB_NAME should be same as database name assigned while creating the database.
PlutoRoomsDBWatcher.watch(DB_NAME, SampleDatabase::class.java)

🎉  You are all done!

Now re-build and run your app and open Pluto, you will see the Rooms Database plugin installed.


Open Plugin view programmatically

To open Rooms Database plugin screen via code, use this

Pluto.open(PlutoRoomsDatabasePlugin.ID)