-->

Simulate onFling() programmatically instead of det

2019-05-30 03:50发布

问题:

This is my first post on StackOverflow! I have a background service running and I was wondering if I could actually simulate a horizontal fling touch screen gesture instead of just detecting that it was been called.

I can figure out how to capture this event, but I want to actually simulate a touch fling horizontal gesture instead of waiting for one.

Thanks beforehand!

回答1:

There is an API for simulating touch events. Some people report limited success simulating a fling using the TouchUtil API.