quit menu in the android
<p>hello everyone i want to set the quit menu in my app . The problem i am facing by using         <code>System.exit(0);</code> it quit from the main acitivity but from the second activity when i press the quit button it come to first activity . </p>

<p>By using <code>moveTaskToBack(true)</code> it works fine but when i start the app again it bring back the activity from which i was quited not the main activity . so please suggest me the how we can quit easily from it </p>
