-
-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MotionEvent object in callback of gesture/tap detection #56
Comments
Can you elaborate why you would need the MotionEvent for? Like what data are you trying to extract? The thing is this is out of the scope of this library. Sensey is a gesture detection library. It will detect a gesture and return a call back with just that. Propagating data through the callback would defeat the goals of this library. |
Yaa, I get your point. But Nishant problem is that I want to detect MotionEvent.x, MotionEvent.y, MotionEvent.actionType from the click and send it back to the server. So I'm creating a screen sharing and remote access control app, where On the client-side if a click event happens I need to send the particular x, y, and action(down, up or move) back to the server. and the server will then render that touch event on his phone. That's why I need to have motionEvent on all the callbacks. I find the Sensey a one stop solution with exact requirements. I want to use this as the touch Engine in my app. |
I will take a look if there a possibility of adding a solution, since the public API cannot be changed right away. Alternatively I think you could just code this functionality using Android api itself. Take a look at how I implemented it in Sensey and create something similar for your usecase. Why I am suggesting this, because your use case is unique. A library usually caters to common solutions and is ideally abstracting away as much complexity it can. Data propagation through callbacks has implications and Sensey wouldn't solve all the problems. |
I get your point. Sure then I'll look into Sensey code and will try to create something for my use case. Anyways, thank you so much for being responsive.🔆 |
Nishant, if possible please create an overridden method where we get MotionEvent object in callback as well. Until then I'll close the issue right away. |
I'll keep the issue open, in case someone has the same issue and would like to upvote it. At the same time I would also be looking into your suggestion. Thank you for your contribution :) |
Yeah Sure. |
Hii thank you so much for such a wonderful library 🔆
I'm using some other library to detect a global touch in my app due to some personal reasons. Which detects touch anywhere in the apo. When there's any touch action I get a callback with motion event. which I can pass to Sensey touchDispatcher. Actually, I've some specific requirements. When there's any callback on gesture detection, say Swipe detection callback. I want MotionEvent object as well, to detect where the event happened. Because now touches are global in the app. I actually don't know on what view or where touch happened. As Sensey currently doesn't provide MotionEvent in callback of detection.
So can we have MotionEvent object in some overridden method? Or how can I get that?
The text was updated successfully, but these errors were encountered: