0

I have a question, I noticed an effect when testing my release on my mobile device like described in this link. To sumarize it, after installing my App, when I instantly start it, it is started from a different "root" than when I start it from the home screen. The effect is that when I press the home button after starting it and then want to return to the running activity the app is started again (because it was started from a different context). On this link there is also a solution proposed, but I don`t like it so much. So what I wanted to ask at last is, does this effect appear also to users who are downloading my app from the market? Because if, then I would be really suprised, because till it happened to me I didnt read about it at all and I also didnt hear that somebody has got this problem.

Thanks a lot in advance, with best regards eMu

Community
  • 1
  • 1
Emad Easa
  • 79
  • 1
  • 10
  • 1
    Yes, whatever you test on your device, the final released app will behave the same way, unless you fix your app :) I think your app has some problems. Would be nice, if you mention how you start your activities, and if you use any flags or not. – Kumar Bibek May 22 '12 at 18:01
  • Thank you for your answer. I dont know exactly what you mean with how I start my app. Is there a special way how to start or to end it? :) In my trial version I start a splash screen through a handler in the onCreate that takes 3 seconds and then I start the next activity with startActivity(myIntent) – Emad Easa May 22 '12 at 19:14

1 Answers1

0

Below is the code i am using:

@Override
protected void onCreate(Bundle intr)
{
    super.onCreate(intr);
    setContentView(R.layout.intro);

  new Handler().postDelayed(new Runnable()
      {
        @Override
        public void run() {
            finish();

        Intent i = new Intent(this, MyActivity.class);
        startActivity(i);                       


    } 
  }, _splashTime);
}

Is there any flag i can set when starting my Activity so it will not be called again or replaced by a new one (like with singleTop launch mode)?

Emad Easa
  • 79
  • 1
  • 10
  • I fixed this issue with #13 of this [link](http://code.google.com/p/android/issues/detail?id=2373#c21), thanks for your help! Best Regards eMu – Emad Easa May 23 '12 at 07:16