Overview
Checks whether Dynamic Color functionality is available on the current Android device. Dynamic Color requires Android 12 (API level 32) or higher.Method Signature
Parameters
Callback function that receives the availability statusCallback Parameters:
available(boolean):trueif Dynamic Color is available (Android 12+),falseotherwise
Returns
Returns
true if the device is running Android 12+ (API level 32) and Dynamic Color is supported, otherwise returns falseExample
Usage Pattern
This method should be called after thedeviceready event to ensure the plugin is initialized:
Implementation Details
- Platform Support: Android only
- Minimum Version: Android 9+ (API level 28) for dark theme detection, Android 12+ (API level 32) for Dynamic Color
- Native Implementation: Uses
DynamicColors.isDynamicColorAvailable()from Material Design library
Always check availability before using other Dynamic Color methods. On devices below Android 12, this will return
false and other methods will not return color data.