Vote count: 0 With API 24 we got a way to dispatch a gesture to the device, however there is no solid documentation or examples out there yet. I am trying to get it to work but currently the gesture is hitting the "onCancelled" callback every time. Here is my code that calls the method: @TargetApi(24) private void pressLocation(Point position){ GestureDescription.Builder builder = new GestureDescription.Builder(); Path p = new Path(); p.lineTo(position.x, position.y); p.lineTo(position.x+10, position.y+10); builder.addStroke(new GestureDescription.StrokeDescription(p, 10L, 200L)); GestureDescription gesture = builder.build(); boolean isDispatched = dispatchGesture(gesture, new GestureResultC...
ادامه مطلب