Install the Plugin
Install the plugin using the Cordova CLI:This will automatically:
- Add the plugin to your Cordova project
- Include the Google Material library dependency (com.google.android.material:material:1.9.0)
- Register the
DynamicColorglobal object
Verify Platform Requirements
Ensure your project targets Android 12 or higher.Update your
config.xml to target the appropriate Android version:If you need to support older Android versions, use the
isDynamicColorAvailable() method to check for availability at runtime before using dynamic color features.Dependencies
The plugin automatically includes the following dependency:- Google Material Library:
com.google.android.material:material:1.9.0
Next Steps
Now that the plugin is installed, proceed to the Quick Start guide to learn how to use it in your application.Quick Start
Learn how to implement Dynamic Color in your app