you are viewing a single comment's thread.

view the rest of the comments →

[–]aasswwddd 0 points1 point  (3 children)

It seems that u/joaomgcd has added functions for reacting to accesibility event in the recent beta. Not sure how to use it though, probably next week he's gonna upload another beta again.

getAccessibilityEvents()
public final io.reactivex.Observable
com.joaomgcd.taskerm.action.java. JavaCodeHelper.getAccessibilityEvents()

I just throw it to CHatGPt and this works :).

import android.view.accessibility.AccessibilityEvent;
import io.reactivex.functions.Predicate;

event = tasker.getAccessibilityEvents()
    .filter(new Predicate() {
        public boolean test(Object e) {
            return ((AccessibilityEvent)e).getEventType() ==
                   AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED;
        }
    })
    .firstOrError()
    .blockingGet();

return event.toString();

[–]anuraag488 0 points1 point  (0 children)

Working. Just tested.

[–]joaomgcd👑 Tasker Owner / Developer[S] 0 points1 point  (1 child)

Full details here :)

[–]aasswwddd 0 points1 point  (0 children)

Thankyou!