5

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.

Peter Birdsall
  • 3,159
  • 5
  • 31
  • 48
  • What do you mean by description? You mean the string that shows up in the list of available services, where you'd go to enable it? – MobA11y Jan 27 '16 at 18:29
  • You go to Settings system app and then to Accessibility, you then get a list of services, when you click on one of the Services to turn it 'on' or 'off', the default description is 'No Description provided.' The provided image is when I clicked on the ClockBack service. I'd like to include a better message than 'No Description provided.' – Peter Birdsall Jan 28 '16 at 04:21

1 Answers1

11

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"
    />
MobA11y
  • 18,425
  • 3
  • 49
  • 76
  • 1
    Not for the description. Your code doesn't get executed when the services menu gets created. Many other aspects of the meta-data can be set in code, but not this. – MobA11y Jan 08 '20 at 11:37