This question might seem very simple to answer, but I seem to be having a problem with adding an XML that's referenced by my accessibility service's metadata. I tried many things, but couldn't find a solution. I placed the reference XML file for the metadata under res>xml and I don't see why it shouldn't work.
This is the code I have for my AndroidManifest.xml file:
'''
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myapplication">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name=".myAccessibilityService"
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE"
android:label="detectClick">
<intent-filter>
<action android:name="android.accessibilityservice.AccessibilityService" />
</intent-filter>
<meta-data
android:name="android.accessibilityservice"
android:resource="@xml/accessibility_service_config" />
</service>
</application>
</manifest>
'''
This is how my XML file looks like:
'''
'''
I expected the "android" to be color-coded, but it doesn't seem that way, causing my service to not request certain permissions (which means it's not working). Something interesting that happened was that when I deleted the XML file for the metadata, the error detector tried to automatically create an XML with fields I wasn't familiar with. I was thinking it had something to do with this, but wasn't sure:
'''
'''
Any help would be greatly appreciated.