Subscribe notification of another app. #1

Finally came up here doing connect to messanger because buy the Sony SW2…

1. Register accessibility service
register accessibility service, then achive the permission.
can access the notification of another application.

Accessibility service became run, if register manifest.xml only.
but, if two or more accessility service require same permission,
that’s maybe impossible.

Therefore, one accessilibty service broadcast to another apps.

In manifest.xml
  <serviceandroid:name=“com.mypackage.MyAccessibilityService”
        android:permission=“android.permission.BIND_ACCESSIBILITY_SERVICE”>
    <intent-filter>
        <actionandroid:name=“android.accessibilityservice.AccessibilityService”/>
      intent-filter>
      <meta-data
            android:name=“android.accessibilityservice”
            android:resource=“@xml/accessibilityservice”/>
   </service>

Make meta-data with xml

in acessibilityservice.xml
<accessibility-servicexmlns:android=“http://schemas.android.com/apk/res/android”
    android:accessibilityEventTypes=“typeNotificationStateChanged”
    android:accessibilityFeedbackType=“feedbackAllMask”
    android:notificationTimeout=“100”/>

AccessilibtyEventType must not duplicated maybe…

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>