I have an application that is just about ready to go... if I can solve one last problem.
When the user taps the "home" key, as expected, the home screen shows up on the phone. However, when the use taps my application icon, the application opens up on the activity that was last viewed. I dunno, its seems the application is running in the background. I would like the app to restart on the first activity.
I considered using "finish()" in the onStop event, but that did not seem like right solution (although it may be and will I need to do it on all activities?).
Then I came across this while search the forum (credit to user rackham)...
Using java Syntax Highlighting
ActivityManager aM = (ActivityManager) getApplicationContext().getSystemService( ACTIVITY_SERVICE );
Parsed in 0.011 seconds, using GeSHi
Using xml Syntax Highlighting
<uses-permission android:name="android.permission.RESTART_PACKAGES" />
Parsed in 0.000 seconds, using GeSHi
The above might be the solution I need. However, do I need to put the above on every activity.
Basically, I want the application to end when the user taps the home key no matter which activity they happen to be viewing.
Thanks in advance