Android Question AccessibilityService. performGlobalAction and dispatchGesture?

OliverA

Expert
Licensed User
Longtime User
In the accessibility_service_config.xml located under Res\xml, try adding
XML:
android:canPerformGestures="true"
and see if that enables your application to perform gestures.
File content as provided by sample before modification:
XML:
<?xml version="1.0" encoding="utf-8"?>
<accessibility-service
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:accessibilityEventTypes="typeWindowStateChanged|typeWindowContentChanged|typeWindowsChanged"
    android:accessibilityFeedbackType="feedbackGeneric"
    android:accessibilityFlags="flagReportViewIds|flagIncludeNotImportantViews"
    android:description="@string/accessibility_service_description"
    android:canRetrieveWindowContent="false"
    android:notificationTimeout="500" 
/>
After
XML:
<?xml version="1.0" encoding="utf-8"?>
<accessibility-service
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:accessibilityEventTypes="typeWindowStateChanged|typeWindowContentChanged|typeWindowsChanged"
    android:accessibilityFeedbackType="feedbackGeneric"
    android:accessibilityFlags="flagReportViewIds|flagIncludeNotImportantViews"
    android:description="@string/accessibility_service_description"
    android:canRetrieveWindowContent="false"
    android:notificationTimeout="500"
    android:canPerformGestures="true"
/>
Note: This is pertaining to the question as to why gestures are not working as posted here: https://www.b4x.com/android/forum/t...e-starter-service-oddities.114354/post-774779
 
Upvote 0

zhousongke

Member
Licensed User
Longtime User
In the accessibility_service_config.xml located under Res\xml, try adding
XML:
android:canPerformGestures="true"
and see if that enables your application to perform gestures.
File content as provided by sample before modification:
XML:
<?xml version="1.0" encoding="utf-8"?>
<accessibility-service
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:accessibilityEventTypes="typeWindowStateChanged|typeWindowContentChanged|typeWindowsChanged"
    android:accessibilityFeedbackType="feedbackGeneric"
    android:accessibilityFlags="flagReportViewIds|flagIncludeNotImportantViews"
    android:description="@string/accessibility_service_description"
    android:canRetrieveWindowContent="false"
    android:notificationTimeout="500"
/>
After
XML:
<?xml version="1.0" encoding="utf-8"?>
<accessibility-service
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:accessibilityEventTypes="typeWindowStateChanged|typeWindowContentChanged|typeWindowsChanged"
    android:accessibilityFeedbackType="feedbackGeneric"
    android:accessibilityFlags="flagReportViewIds|flagIncludeNotImportantViews"
    android:description="@string/accessibility_service_description"
    android:canRetrieveWindowContent="false"
    android:notificationTimeout="500"
    android:canPerformGestures="true"
/>
Note: This is pertaining to the question as to why gestures are not working as posted here: https://www.b4x.com/android/forum/t...e-starter-service-oddities.114354/post-774779


It's working, thank you!
 
Upvote 0
Top