Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 56329843 authored by Joe Fernandez's avatar Joe Fernandez
Browse files

docs: Fix bug with Accessibility Services dev guide

b/11448573

Change-Id: I778c26f86c4a2cb3ebef9f3e75b5d544269486dc
parent 611dea81
Loading
Loading
Loading
Loading
+18 −12
Original line number Original line Diff line number Diff line
@@ -71,15 +71,20 @@ accessibility service.</p>


<h3 id="service-declaration">Accessibility service declaration</h3>
<h3 id="service-declaration">Accessibility service declaration</h3>


<p>In order to be treated as an accessibility service, your application must include the
<p>In order to be treated as an accessibility service, you must include a
{@code service} element (rather than the {@code activity} element) within the {@code application}
{@code service} element (rather than the {@code activity} element) within the {@code application}
element in its manifest. In addition, within the {@code service} element, you must also include an
element in your manifest. In addition, within the {@code service} element, you must also include an
accessibility service intent filter. For compatiblity with Android 4.1 and higher, the manifest
accessibility service intent filter. For compatiblity with Android 4.1 and higher, the manifest
must also request the {@link android.Manifest.permission#BIND_ACCESSIBILITY_SERVICE} permission
must also request the {@link android.Manifest.permission#BIND_ACCESSIBILITY_SERVICE} permission
as shown in the following sample:</p>
as shown in the following sample:</p>


<pre>
<pre>
&lt;manifest&gt;
  ...
  &lt;uses-permission ... /&gt;
  ...
  &lt;application&gt;
  &lt;application&gt;
    ...
    &lt;service android:name=&quot;.MyAccessibilityService&quot;
    &lt;service android:name=&quot;.MyAccessibilityService&quot;
        android:label=&quot;@string/accessibility_service_label&quot;
        android:label=&quot;@string/accessibility_service_label&quot;
        android:permission=&quot;android.permission.BIND_ACCESSIBILITY_SERVICE&quot&gt;
        android:permission=&quot;android.permission.BIND_ACCESSIBILITY_SERVICE&quot&gt;
@@ -89,6 +94,7 @@ as shown in the following sample:</p>
    &lt;/service&gt;
    &lt;/service&gt;
    &lt;uses-permission android:name="android.permission.BIND_ACCESSIBILITY_SERVICE" /&gt;
    &lt;uses-permission android:name="android.permission.BIND_ACCESSIBILITY_SERVICE" /&gt;
  &lt;/application&gt;
  &lt;/application&gt;
&lt;/manifest&gt;
</pre>
</pre>


<p>These declarations are required for all accessibility services deployed on Android 1.6 (API Level
<p>These declarations are required for all accessibility services deployed on Android 1.6 (API Level