amahi / android

Amahi Android App
GNU General Public License v3.0
164 stars 279 forks source link

Adding Press Back Button Again To Exit App Functionality #730

Closed Prakhar-Agarwal-byte closed 3 years ago

Prakhar-Agarwal-byte commented 3 years ago

Describe the issue Currently, the user exits the app as soon as he presses the back button while on Navigation Activity. Since the app requires the user to press the back button to navigate up, the user can often, by mistake, exit the app. To prevent this from happening we should add a toast message that asks the user to press the back button again to confirm that the user surely wants to exit the app.

To Reproduce or Feature details Steps to reproduce the behavior:

  1. Press the back button while on Navigation Activity.
  2. Notice that we exit the app without confirmation.

Current behavior

App exits without toast message with a single press of the back button

https://user-images.githubusercontent.com/17739006/105395662-fe5d7000-5c44-11eb-95ca-2735cb5e15dc.mp4

Expected behavior

Toast message shows up asking the user to press the back button again. If the user presses the button again in a certain time limit, only then the app exit.

https://user-images.githubusercontent.com/17739006/105395320-9b6bd900-5c44-11eb-9b44-87f5cef04ea0.mp4

Smartphone (please complete as much of the following information as possible):