AccessibilityService can only get event in system programs and my own program in Android API 34

49 Views Asked by At

As the title said, My program worked properly in android 13, API 33. But cant get any other package name or nodes except for my own program and system programs. Can anyone help? My settings are as below anrdroid.mani

        <service android:name=".service.SkipAdService"
                 android:exported="false"
                 android:label="a"
                 android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE">
            <intent-filter>
                <action android:name="android.accessibilityservice.AccessibilityService"/>
            </intent-filter>
            <meta-data
                    android:name="android.accessibilityservice"
                    android:resource="@xml/skip" />
        </service>

skip.xml

<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
    android:accessibilityEventTypes="typeViewClicked|typeWindowStateChanged|typeContextClicked|typeAllMask"
    android:accessibilityFeedbackType="feedbackSpoken"
    android:canPerformGestures="true"
    android:canRetrieveWindowContent="true"
    android:accessibilityFlags="flagDefault|flagRequestEnhancedWebAccessibility|flagRetrieveInteractiveWindows|flagIncludeNotImportantViews|flagReportViewIds|flagRequestTouchExplorationMode"
    android:notificationTimeout="100"/>

I dont know if this is because of the upgrade of android. If so, how to make it work?

0

There are 0 best solutions below