Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Declaring app as not an AccessibilityTool to comply with google play requirements

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: 1 2

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.

like image 237
Abed Avatar asked Sep 06 '25 02:09

Abed


2 Answers

You can declare that in the manifest file's application tag of your Accessibility service

 <application...
 ...
 android:isAccessibilityTool="false"
 ...
 .. >

 ... />

OR

as an attribute to your service, your code will be

<service
 android:name=".MyAccessibilityService"
 android:exported="true"
 android:isAccessibilityTool="false">
 <intent-filter>
 <action android:name="android.accessibilityservice.AccessibilityService" 
 />
 </intent-filter>
 <meta-data
 android:name="android.accessibilityservice"
 android:resource="@xml/serviceconfig" />
 </service>

If you set isAccessibilityTool="false", but still use the service, you would need to complete the declaration on google play conbsole.

Check this for more details Declaration for apps that are NOT accessibility tools

like image 72
Gouse Mohiddin Avatar answered Sep 10 '25 10:09

Gouse Mohiddin


Can you check the merged AndroidManifest? Maybe it's a library or module accessing the AccessibilityService API, you have to remove the following lines if they exist in your app AndroidManifest, if don't want to fill the Google Play usage accessibility form:

<intent-filter>
     <action android:name="android.accessibilityservice.AccessibilityService" />
</intent-filter>

Also, check that you're not requesting permission for an accessibility service by accident in one of your services in the AndroidManifest:

android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE"

and probably you don't need to use the isAccessibilityTool attribute.

like image 36
snorlax Avatar answered Sep 10 '25 10:09

snorlax