How can I tell if my Android back button is pressed?
Answer
In order to check when the ‘BACK’ button is pressed,
use onBackPressed() method from the Android library. Next, perform a check to see if the ‘BACK’ button is pressed again within 2 seconds and will close the app if it is so.
Answer
In order to check when the ‘BACK’ button is pressed,
use onBackPressed() method from the Android library. Next, perform a check to see if the ‘BACK’ button is pressed again within 2 seconds and will close the app if it is so.