I created a login activity for my Android app. After the user enters the correct credentials, the login activity will switch over to the homepage but I don\'t know why my code w
I don't think you have added the Intent
code here that will help you switch to another Activity.
protected void onPostExecute(String file_url) {
// dismiss the dialog once done // Intent Code Missing.
pDialog.dismiss();
You should do a UI work in UI thread and Non-UI work in Non-UI thread, thats a rule from the arrival of HoneyComb version of android.
You have added the below code in doInBackground()
, That should be in onPostExcute()
Intent homepage = new Intent( getApplicationContext(), HomepageEmployerActivity.class);
homepage.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(homepage);