我已經編寫了我自己的輔助功能服務。它在4.1.1及更低版本上正常工作。但是,我發現在「設置」>「輔助功能」中找不到4.2.2上的服務。有什麼我應該知道關於4.2.2的可靠性嗎?android無法在4.2上添加輔助功能
這是我在Android清單
<service android:name="my_service_name"
android:label="@string/accessibility_service_lable">
<meta-data
android:name="android.accessibilityservice"
android:resource="@xml/accessibility_service_config"/>
<intent-filter >
<action android:name="android.accessibilityservice.AccessibilityService"/>
</intent-filter>
</service>
<uses-permission android:name="android.permission.BIND_ACCESSIBILITY_SERVICE" />
後續是配置文件中聲明,這是非常簡單的。
<?xml version="1.0" encoding="utf-8"?>
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
android:description="@string/accessibility_service_description"
/>
您可以包含的AndroidManifest.xml服務的聲明,包括如果指定一個元數據的XML文件的內容? – alanv
我添加了這些文件,並且我還發現某些設備可能會在用戶更新我的應用時自動啓用我的輔助功能服務。有什麼配置嗎?謝謝。 – TerryChao