How to override onBackPressed but also get the touch event?

Viewed 81

I'm working on an Android project in Java and I'd like to get the MotionEvent when the user hits the back button (onBackPressed). I know how to override the back button press, and i know how to get the touch event from touches in my activity, but I couldn't find a way to get the touch event details out of the back button press. The goal is to write the user's touch event details (as if the user touches a regular view) to a file, even when the back button is pressed. Is it possible? if so, how can I do it?

0 Answers
Related