When my app starts, it checks to see if it has stored login credentials. if it doesn't, it starts another activity to prompt the user for those credentials. My problem is, that when the prompt activity is started, the first activity continues execution and ends up with null pointers because the prompt activity has not yet returned the needed data
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
tv = new TextView(this);
setContentView(tv);
promptForLoginInfo(); //method creates intent and starts activity
displayCredentials(); //prints data to screen
}
the output reads: "null" because the program executes "displayCredentials()" before the login prompt activity returns.
Anyone have a clue what to do?