This is my very first post on StackOverflow.
Basically, my app starts by checking to see if a user record exists in my Sqlite Database. If yes, I would like it to display my main application screen. If not, I would like another screen to be displayed, prompting the user for a password.
This password screen is a new addition to my app. It originally just displayed the main screen like so:
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Then I would run the check for a user. If no user is found I display the password screen like so:
Intent myIntent = new Intent(this, loginScreenActivity.class);
startActivityForResult(myIntent, 0);
The problem is, if I decide to hit the BACK button to exit out of the application from the password screen, it goes back to the main screen.
How can I first run the check, then display one of the two views??
Hope this makes sense.
Thanks in advance.
When you navigate to the login screen, call finish() on the first screen