When targeting Android SDK (31), google play requires us to specify the isAccessibilityTool
attribute in our app, if the app is not an accessibility tool then you have to declare that in your app, but where to?
If we haven't declared that in you the app google presume that you are using AccessibilityService
API
If you have not declared your app to be an accessibility tool but use the AccessibilityService API, i.e. you have not set the
isAccessibilityTool
flag in your accessibility service’s metadata file, you will be required to complete an accessibility declaration in Play Console. source
Google Play Console now requires me to fill a form of why I am using AccessibilityService
(which my app does not use) when I am targeting Android 12.
To give more details to the issue here are some images from Google Console:
I tried to create a service of AccessibilityService
and in metadata to set isAccessibilityTool
to false
, but still google won't let me update the app till I fill the Accessibility services form:
class MyAccessibilityService: AccessibilityService() {
override fun onAccessibilityEvent(event: AccessibilityEvent?) {}
override fun onInterrupt() {}
}
Here is the service declaration in the AndroidManifest file:
<service
android:name=".MyAccessibilityService"
android:exported="true">
<intent-filter>
<action android:name="android.accessibilityservice.AccessibilityService" />
</intent-filter>
<meta-data
android:name="android.accessibilityservice"
android:resource="@xml/serviceconfig" />
</service>
Here is the content of serviceconfig file:
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:isAccessibilityTool="false"
android:packageNames="com.example.my_package"
tools:targetApi="s" />
Am I missing out on something? Where or How to declare the isAccessibilityTool
attribute to till the Console this is the app not use the AccessibilityService
API?
Update
I tried to include the service metadata directly in the application tag:
<application
...>
<meta-data
android:name="android.accessibilityservice"
android:resource="@xml/serviceconfig" />
</application>
Also, I tried to use the isAccessibilityTool
attribute directly in the application tag:
<application
....
tools:targetApi="s"
android:isAccessibilityTool="false">
</application>
non of the above worked for me
Final update
I checked the merged manifest and one of the services contains this permission:
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE"
I only removed this line and worked (thanks to Snorlax for his answer google play no more is asking me tool fill the form why I'm using AccessibilityService
API.