Search code examples
androidaccessibilityaccessibilityservice

Android accessibility service - "does not support the current system language"


I've made a simple app for Android that provides Accessibility service.

When I install the app on Android 10 (Samsung) and activate the Accessibility service, OS says:

APP does not support the current system language. The text-to-speech language will be set to English (United States), but this might cause unexpected behavior.

It happens when system language is en_US/es_US and text-to-speech language is Spanish.

I've added values-es/strings.xml with translations but it does not help.

What can I do to provide support for different text-to-speech languages?


Solution

  • I think the problem probably lies in the fact that the Accessibility Service you created probably states in its configuration:

        android:accessibilityFeedbackType="feedbackSpoken"
    
    

    This is also the example from all the different tutorial and Android official documentation. However it seems like there is an undocumented check of the supported TTS languages for the service if its feedback is spoken.

    I still didn't found the exact check and how to declare the supported languages, however, if this is not critical for you and/or if the service you create doesn't really use TTS for feedback, you can use a different android:accessibilityFeedbackType For example:

        android:accessibilityFeedbackType="feedbackGeneric"