在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):phonegap/phonegap-mobile-accessibility开源软件地址(OpenSource Url):https://github.com/phonegap/phonegap-mobile-accessibility开源编程语言(OpenSource Language):JavaScript 38.1%开源软件介绍(OpenSource Introduction):phonegap-plugin-mobile-accessibility========================================== This plugin exposes information on the status of various accessibility features of mobile operating systems, including, for example, whether a screen reader is running, invert colors is enabled, and the preferred scaling for text. It also allows an application to send a string to be spoken by the screen reader, or a command to stop the screen reader from speaking. Installation
Supported Platforms
MobileAccessibilityThe Methods
MobileAccessibility.isScreenReaderRunning(callback)Makes an asynchronous call to native Parameters
Usage function isScreenReaderRunningCallback(boolean) {
if (boolean) {
console.log("Screen reader: ON");
// Do something to improve the behavior of the application while a screen reader is active.
} else {
console.log("Screen reader: OFF");
}
}
MobileAccessibility.isScreenReaderRunning(isScreenReaderRunningCallback); Supported Platforms
MobileAccessibility.isVoiceOverRunning(callback)An iOS-specific proxy for the Parameters
Usage function isVoiceOverRunningCallback(boolean) {
if (boolean) {
console.log("Screen reader: ON");
// Do something to improve the behavior of the application while a screen reader is active.
} else {
console.log("Screen reader: OFF");
}
}
MobileAccessibility.isVoiceOverRunning(isVoiceOverRunningCallback); Supported Platforms
MobileAccessibility.isTalkBackRunning(callback)An Android/Amazon Fire OS-specific proxy for the Parameters
Usage function isTalkBackRunningCallback(boolean) {
if (boolean) {
console.log("Screen reader: ON");
// Do something to improve the behavior of the application while a screen reader is active.
} else {
console.log("Screen reader: OFF");
}
}
MobileAccessibility.isTalkBackRunning(isTalkBackRunningCallback); Supported Platforms
MobileAccessibility.isChromeVoxActive()On Android, this method returns Returns
Usage MobileAccessibility.isTalkBackRunning(
function (bool) {
console.log('Talkback status: ' + bool);
if (bool) {
/* Use setTimeout to account for latency in initialization of ChromeVox */
setTimeout(function() {
if (MobileAccessibility.isChromeVoxActive()) {
console.log('ChromeVox is active.');
} else {
console.log('ChromeVox is not active.');
/* Notify the user of a potential problem */
MobileAccessibility.speak('The ChromeVox screen reader has failed to initialize. You may wish to close and restart this app.');
}
}, 5000);
}
}); Supported Platforms
MobileAccessibility.isBoldTextEnabled(callback)Makes an asynchronous call to native Parameters
Usage function isBoldTextEnabledCallback(boolean) {
if (boolean) {
console.log("Bold Text: ON");
// Do something to improve the behavior of the application while Bold Text is enabled.
} else {
console.log("Bold Text: OFF");
}
}
MobileAccessibility.isBoldTextEnabled(isBoldTextEnabledCallback); Supported Platforms
MobileAccessibility.isClosedCaptioningEnabled(callback)Makes an asynchronous call to native Parameters
Usage function isClosedCaptioningEnabledCallback(boolean) {
if (boolean) {
console.log("Closed Captioning: ON");
// Do something to improve the behavior of the application while closed captioning is enabled.
} else {
console.log("Closed Captioning: OFF");
}
}
MobileAccessibility.isClosedCaptioningEnabled(isClosedCaptioningEnabledCallback); Supported Platforms
MobileAccessibility.isDarkerSystemColorsEnabled(callback)Makes an asynchronous call to native Parameters
Usage function isDarkerSystemColorsEnabledCallback(boolean) {
if (boolean) {
console.log("Darker System Colors: ON");
// Do something to improve the behavior of the application while Darker System Colors is enabled.
} else {
console.log("Darker System Colors: OFF");
}
}
MobileAccessibility.isDarkerSystemColorsEnabled(isDarkerSystemColorsEnabledCallback); Supported Platforms
MobileAccessibility.isGrayscaleEnabled(callback)Makes an asynchronous call to native Parameters
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); Supported Platforms
MobileAccessibility.isGuidedAccessEnabled(callback)Makes an asynchronous call to native Parameters
Usage function isGuidedAccessEnabledCallback(boolean) {
if (boolean) {
console.log("Guided Access: ON");
// Do something to improve the behavior of the application while Guided Access is enabled.
} else {
console.log("Guided Access: OFF");
}
}
MobileAccessibility.isGuidedAccessEnabledEnabled(isGuidedAccessEnabledCallback); Supported Platforms
MobileAccessibility.isInvertColorsEnabled(callback)Makes an asynchronous call to native Parameters
Usage function isInvertColorsEnabledCallback(boolean) {
if (boolean) {
console.log("Invert Colors: ON");
// Do something to improve the behavior of the application while Invert Colors is enabled.
} else {
console.log("Invert Colors: OFF");
}
}
MobileAccessibility.isInvertColorsEnabled(isInvertColorsEnabledCallback); Supported Platforms
MobileAccessibility.isMonoAudioEnabled(callback)Makes an asynchronous call to native Parameters
Usage function isMonoAudioEnabledCallback(boolean) {
if (boolean) {
console.log("Mono Audio: ON");
// Do something to improve the behavior of the application while Mono Audio is enabled.
} else {
console.log("Mono Audio: OFF");
}
}
MobileAccessibility.isMonoAudioEnabled(isMonoAudioEnabledCallback); Supported Platforms
MobileAccessibility.isReduceMotionEnabled(callback)Makes an asynchronous call to native Parameters
Usage |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论