0
<https://stackoverflow.com/posts/72801564/timeline>
I am trying to build an accessibility service for android and when I am
trying to call this function, it always returns 0
class AccessibilityPerform extends Accessibility Service{
@Override protected void onServiceConnected() {
accessibilityButtonController = getAccessibilityButtonController();
mIsAccessibilityButtonAvailable =
accessibilityButtonController.isAccessibilityButtonAvailable();
if (!mIsAccessibilityButtonAvailable) { return; }
AccessibilityServiceInfo serviceInfo = getServiceInfo();
serviceInfo.flags |=
AccessibilityServiceInfo.FLAG_REQUEST_ACCESSIBILITY_BUTTON;
setServiceInfo(serviceInfo);
}
@Override public void onAccessibilityEvent(AccessibilityEvent
accessibilityEvent) {
Log.d("Action",String.valueOf(accessibilityEvent.getAction()));
}
@Override public void onInterrupt() {} }
Also I am having minimumSdk version 28 so no problem with
FLAG_REQUEST_ACCESSIBILITY_VERSION and I have also set my xml file properly
and all flags have been added. So my question is, Is this normal for an
accessibilityEvent.getAction() to return 0 everytime. Because I think that
it stands for the action which has been performed like
AccessbilityNodeInfo.ACTION_CLICK. Correct me if I am wrong. Thanks
--
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/4f76e888-057b-4315-a708-0fac2e448973n%40googlegroups.com.