Well I left some important things in the AndroidManifest.xml
, so now its working perfectly. Here's the new manifest
<service
android:name=".NotificationService"
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE"
class=".NotificationService"
android:enabled="true"
android:exported="false" >
<intent-filter>
<action
android:name=".NotificationService"
android:value=".NotificationService" />
</intent-filter>
<intent-filter>
<action android:name="android.accessibilityservice.AccessibilityService" />
</intent-filter>
</service>