Android Question android AccessibilityService help

frankly

Member
Licensed User
is possible this conversion para b4a code? i need move a click in 2 points ,same like gesture

Java:
public void Swipe(int x1, int y1, int x2, int y2, int time) {

if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
    System.out.println(" ======= Swipe =======");

    GestureDescription.Builder gestureBuilder = new GestureDescription.Builder();
    Path path = new Path();
    path.moveTo(x1, y1);
    path.lineTo(x2, y2);

    gestureBuilder.addStroke(new GestureDescription.StrokeDescription(path, 100, time));
    dispatchGesture(gestureBuilder.build(), new GestureResultCallback() {
        @Override
        public void onCompleted(GestureDescription gestureDescription) {
            System.out.println("SWIPE Gesture Completed :D");
            super.onCompleted(gestureDescription);
        }
    }, null);
}

}
 

moster67

Expert
Licensed User
Longtime User
I doubt it can be simply translated into B4X code, and even used as "normal" Android java code, unless it is part of Android's Accessibility Services.
 
Upvote 0

frankly

Member
Licensed User
There is no need for exactly this conversion, but will be possible with the b4a lib accessibility, this kind of swipe?

 
Upvote 0

moster67

Expert
Licensed User
Longtime User
Not in the published version.
But, yes, I have written customized versions of the library for other users which includes such features.
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
Is that the general Android lock screen or a lock screen of an app you wish to open?
I have never done it with an unlock pattern so that would require some investigation. Normally, the gesture can be implemented in various ways, depending on if the device is rooted or not, if the views are identified while accessibility services are running or not. The approach must be decided upon these considerations.
Anyway, it would be a customized version. If you are interested, we can discuss it further if you contact me by PM.
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
I don't understand why users delete their posts, especially if someone has already replied to them? Now it seems like I replied to something "out of the blue". šŸ¤”
 
Upvote 0

frankly

Member
Licensed User
sorry for deleting, i was going to rephrase the question, actually i just need a simple click drag between 3 points, that's all.
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
Is that the general Android lock screen or a lock screen of an app you wish to open?
 
Upvote 0
Top