I have an android application implementing facebook.It shows facebook login dialog(extends dialog) when click on a button from an activity.
If we pressing home button after loading the facebook dialog, the application exits.But if we restart the application it shows the dialog instead of activity. I am using this in my Dialog class
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK){
mSpinner.dismiss();
mListener.onCancel();
FbDialog.this.dismiss();
}
return super.onKeyUp(keyCode, event);
}
From my googling i can find out that we could not obtain Home Button click.
Then how can i exit and finish all the activities with Home button click?