IOS determines if VoiceOver continues

Is there a way to determine if VoiceOver is currently being announced and when it stops. I tried UIAccessibilityVoiceOverStatusChanged, but I understand that this is only if you turn VoiceOver on or off. Any help would be greatly appreciated. thanks.

+4
source share
3 answers

These are all the boolean availability that I found in the documentation:

UIAccessibilityPostNotification UIAccessibilityIsVoiceOverRunning UIAccessibilityIsMonoAudioEnabled UIAccessibilityIsClosedCaptioningEnabled UIAccessibilityRegisterGestureConflictWithZoom 

I don’t think there is anything logical to do what you are talking about.

0
source

We use otherAudioIsPlaying, the problem is that some application is running in the background, like some pedometer monitors, etc., turn on the sound that seems and never let it go even if nothing really says or doesn't reproduced. OtherAudioIsPlaying always returns 1 until you remove another application from the background. So now you can not only not play music, but also do not suspect that another application in the background will ruin this test. Apple really needs to enter an API to determine if Voice Over is currently speaking or not.

+1
source

You can use the "OtherAudioIsPlaying" audio recording property to check if another system process is currently using audio equipment. It must be “true” if VoiceOver says “false” if not.

In fact, this may not work if the user plays music in the background. But most users who run VoiceOver usually do not have any other audio settings, constantly, as this makes it difficult to understand what VoiceOver says.

Here is a usage example:

 UInt32 otherAudioIsPlaying; UInt32 propertySize = sizeof(otherAudioIsPlaying); AudioSessionGetProperty(kAudioSessionProperty_OtherAudioIsPlaying,&propertySize, &otherAudioIsPlaying); if(otherAudioIsPlaying) { // other application is generating sound output (including VoiceOver) // but might also be any other app (like iPod App) } 
0
source

Source: https://habr.com/ru/post/1397451/


All Articles