Skip to content

Develop Custom Pluto Plugins (Beta)

Prateek Srivastava edited this page Dec 3, 2022 · 6 revisions

With the latest architecture, Pluto now allows developers to write their own plugins, as per their needs.

Pluto architecture is currently evolving and is in the BETA phase, we are constantly adding new updates and improvements to the framework, which might break your plugin, so please keep watching the framework for the latest updates.

Implement Plugin.kt

To start developing a plugin, add plugin dependency to your app module and sync your project.

dependencies {
  implementation 'com.plutolib:plugin:LATEST_VERSION'
}

See the Releases page for the latest version


then override the Plugin.kt class and implement the abstract methods.

class CustomPlugin(devIdentifier: String) : Plugin(devIdentifier) {

    override fun getConfig(): PluginConfiguration {}

    override fun getDeveloperDetails(): DeveloperDetails {}

    override fun getView(): Fragment {}

    override fun onPluginInstalled() {}

    override fun onPluginDataCleared() {}
}

Add plugin to Pluto

Once the methods are implemented, add your plugin to Pluto.

Pluto.Installer(this)
  .addPlugin(CustomPlugin("custom_dev_id"))
  .install()

🎉 Congratulations! Your plugin is ready to be used.

Now re-build and run your app, you will receive a notification from Pluto, use it to access Pluto UI.

You will see your plugin present on the selector screen.


Note: For more details about plugin development, refer to Demo Plugin implementation.