Reputation: 19938
I'm trying to use Digits in my app and tested this out on a sample app:
SCREEN 1 - MAINACTIVITY:
I press the button to use my number and it goes to the following screen:
SCREEN 2 - DIGITS SCREEN
Now in my test scenario, the user does not enter in a cellphone number at all. He decides not to use my app and presses the back button at the bottom of the screen to exit from the digits screen.
Instead of going back to SCREEN 1 which is my MainActivity, I would like the app to quit.
I'm looking for a callback method from digits to help me do so but can't seem to find one. How do I achieve the effect that I want?
Upvotes: 0
Views: 153
Reputation: 550
You should clear navigation back stack, when you go to this screen and then override the method onBackPressed()
and call there finish()
.
Check this how to clear back stack.
Upvotes: 1