What is MobileAccessibility.isGrayscaleEnabled(callback)?

Report
Question
15 views

Please explain why do you think this question should be reported?

Report Cancel

Makes an asynchronous call to native MobileAccessibility to determine if Grayscale is enabled.

Parameters

callback (Function) A callback method to receive the boolean result asynchronously from the native MobileAccessibility plugin.

Usage
    function isGrayscaleEnabledCallback(boolean) {
        if (boolean) {
            console.log("Grayscale: ON");
            // Do something to improve the behavior of the application while Grayscale is enabled.
        } else {
            console.log("Grayscale: OFF");
        }
    }

    MobileAccessibility.isGrayscaleEnabled(isGrayscaleEnabledCallback);
Please follow and like us:

About the Author