Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you set the Accessibility setting description for your app when creating a AccessibilityEventService?

enter image description hereI have a working AccessibilityEventService running for my app. How do you set the description in the general Settings menu under Accessibility, for my package, i.e., com.my.package?

All I get is the default 'No description provided.'

I've looked in onServiceConnected(). I'm not currently using any type of manifest XML definition for the serivce, just the AccessibilityEventService.

like image 210
Peter Birdsall Avatar asked Jan 07 '23 18:01

Peter Birdsall


1 Answers

This is the relevant items to make this happen. Here are the two relevant files, and important pieces of information. Scaffolding and such removed.

AndroidManifest.xml

<application>
    <service>
        <meta-data
            android:resource="@xml/service_config" />
    </service>
</application>

service_config.xml

<accessibility-service 
    android:description="@string/accessibility_service_description"
    />
like image 113
ChrisCM Avatar answered Apr 03 '23 03:04

ChrisCM