Intent putExtra(String,String) inside of AsyncTask

I'm simply trying to carry a string onto the next activity without having to define an entire object for the task. I've seen similar solutions and gotten them to work BUT without using AsyncTask to create the intent.\[code\]protected void onPostExecute(Boolean result) { if (loggedIn && hasPin) { Intent intent = new Intent(UniteActivity.this, WebViewActivity.class); intent.putExtra(PASSED_USERNAME, passUser); startActivity(intent); } if (loggedIn && !hasPin) { Intent intent = new Intent(UniteActivity.this, CreatePinActivity.class); intent.putExtra(PASSED_USERNAME, passUser); startActivity(intent);\[/code\]PASSED_USERNAME is a public static constant to hold the package name, just as the putExtra() method requires. I then try to pull the value out in the next activity.\[code\]Intent extras = getIntent(); String username = extras.getStringExtra(UniteActivity.PASSED_USERNAME); // carry username to next activity Intent intent = new Intent(CreatePinActivity.this,WebViewActivity.class); intent.putExtra(PASSED_USERNAME, username); startActivity(intent);\[/code\]There is never a String to pull out, the value of username is always null. I've gone through the debugger and found that the Eclipse IDE debugger shows different intent ID's between the activities, they are never consistant. Is it possible that AsyncTask is interfereing somehow because it splits into a seperate thread?
 
Back
Top