How do I close apps with back button?

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. Otherwise, don’t exit.

Sizin İçin Seçtik  Is it OK to clear app cache?

Leave a Reply

Your email address will not be published. Required fields are marked *