3

I disabled accesibility features for all of my fragments' and Activity views. But it keeps to say activity label (it is app name by default). As I realized it does after every fragment transaction (but i'm not sure). I am going to next fragment and it is saying application name. 1. I've tried to set empty Activity label in AndroidManifest, but if it is empty, android anyway uses app name. 2. I've tried to override Activity method dispatchPopulateAccessibilityEvent:

override fun dispatchPopulateAccessibilityEvent(event: AccessibilityEvent?): Boolean {
        return false
}

And it didn't help too. I've tried to return both "false" and "true". It doesn't affect the problem. 3. I've tried to set importantForAccesibility property of Activity view programmatically in onCreate method:

ViewCompat.setImportantForAccessibility(window.decorView,
ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_NO)

Obviously, it doesn't solve the problem too.

Explanation of why I need to disable Talkback for my application: i'm making app with voice control. And so i'm using text synthesizing, and text synthesizing can't work because Talkback stops my TTS.

Kirill
  • 85
  • 5

1 Answers1

1

I know it's been a long time.. I had the same problem recently and I wasted a lot of time too. I tried to set the title in the activity, with an empty string resource (with or without a whitespace on it), but then it says the application name instead of the activity name. Then I realize that it works if you set the title in the activity with a Charsequence with a whitespace:

setTitle(" ")
Valenji
  • 36
  • 2