onDelete on application start

Hi there i have little problem and i dont know how to solve it(i know but i dont know its the best way)

onDestroy() is called when an activity finishes its life cycle.

I have
[java] @Override
public void onDestroy()

and magic happens on application start it calling onDestroy and killing it ,if i remove this “killProcess” ,app will be still running lovely…

I thought i make boolean initialOnDestroy so i skip first onDestroy call.But i think its kind stupid.
I want to know why is this happen?
Anyone can help me?

Thanks in advance.

This should not happen, I assume a error in some not posted part of the code.

I added [java]android:configChanges=“keyboardHidden|orientation|screenSize”[/java]
For now its working i think there was a problem with orientation change.
But strange cuz this onDestroy was called randomly(sometimes called,sometimes not)

Notice that every time the orientation changes android destroy and recreate the activity.So yes it would be actually that… :slight_smile: