Android back button (short press / long press) - how ?

How to implement basic functionality where short press for back button on Android would do one thing (bring up a menu for example), but a long press would do another thing (quit game for example) ? Thanks.

This is one way to do it [TUTORIAL] Check for double tap - Community & Industry Discussion - Epic Developer Community Forums