I know this has been asked earlier here & here too.They are not answered properly (or not answered at all).But,i don't know why moveTaskToBack(true);
always returns false for me .Can anyone tell me why and how could i solve the issue? Thanks in advance.
public void onBackPressed() {
boolean r= moveTaskToBack(true);
//r is false !! using API LEVEL 8
}
Note:The activity from which i am calling it is a child Activity
included in a tabActivity
and neither of this is a MAIN or LAUNCHER activity.I don't know if that makes a difference.
EDIT:
and as a result the application does'nt go to background.I want it to go to background just as if the hardware HOME is pressed
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…