I have device with Android 2.1 update. I run my app on emulator. It's
works. But on real device it do not work curently.
So, i have 3 Activity. Main, Edit and View.
Main run Edit, Edit Run View. It's first lifecycle of program.
Main run View. It's second lifecycle. It works perfectly.
First lifecycle:
Main run Edit. Edit has onStop() method.
onStop()
{
super.onStop;
finish();
}
Edit run View. View has onKey(...) method and onStop too.
@Override
public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent
event) {
// TODO Auto-generated method stub
if(event.getKeyCode()==KeyEvent.KEYCODE_BACK)
{
finish();
}
return true;
}
It situation on real device:
Main run Edit, Edit run View. I press BACK key in View, but Edit was
finished and i wait see Main. But, i see View again. I press BACK key
again and see Main.
On emulator i see Main after first press.
All activity have launchMode="singleInstance" and
android:finishOnTaskLaunch="true"
So, why? Where is problem?
Thanks.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en