you are finishing the activity onPause..hence you are getting such results.

@Override
    protected void onPause(){
        super.onPause();
        if(SMBGuesstheNumber.isGameStarted)
        {
            savetheGame();
        }
        CtrlMaintanence ctrlMaintanence= new CtrlMaintanence();
        ctrlMaintanence.savetheGame();
*        finish();*
    }


if you need to do any wrk while the activity is finishing then use
isFinishing() method....


On Thu, Apr 9, 2009 at 11:10 AM, Omer Saatcioglu <[email protected]>wrote:

>
> On Apr 7, 8:22 pm, Marco Nelissen <[email protected]> wrote:
> > On Tue, Apr 7, 2009 at 10:04 AM, Omer Saatcioglu <[email protected]>
> wrote:
> >
> > > Hello all,
> >
> > > I have two activities running: MainActivity and ChildActivity.
> > > Whenever the user clicks in the button in MainActivity, the
> > > ChildActivity is launched. What I want to do is this:
> >
> > > When the active activity is the ChildActivity and the user clicks the
> > > home button then relaunch the application (like opening from the
> > > beginning), I want to see the ChildActivity instead of MainActivity
> > > that is launched. However; This is happening only when the user clicks
> > > from recent activities window. (the window opened when you long press
> > > the home button)
> >
> > It should already be doing what you want it to do, unless you have
> > something in your manifest that specifically makes it not do this.
> > What does your AndroidManifest.xml look like?
>
> hello Mark,
>
> Thank you for the interest. the following is my AndroidManifest.xml.
> The MainActivity is GfxMain and ChildActivity is GfxGuesstheNumber
>
> <manifest xmlns:android="http://schemas.android.com/apk/res/android";
>      package="com.saatcioglu.android.guessthenumber"
>      android:versionCode="5"
>      android:versionName="0.5">
>        <uses-permission android:name="android.permission.VIBRATE" />
>        <uses-permission android:name="android.permission.INTERNET" />
>    <application android:icon="@drawable/icon" android:label="@string/
> app_name">
>        <activity android:name=".GfxMain"
>                  android:label="@string/app_name">
>            <intent-filter>
>                <action android:name="android.intent.action.MAIN" />
>                <category
> android:name="android.intent.category.LAUNCHER" />
>            </intent-filter>
>        </activity>
>        <activity android:name=".GfxGuesstheNumber"
>                  android:label="@string/app_name">
>        </activity>
>        <activity android:name=".GfxPreferences"
>                  android:label="Guess the Number Prefs">
>        </activity>
>        <activity android:name=".GfxOptions"
>                  android:label="Guess the Number Prefs">
>        </activity>
>    </application>
> </manifest>
>
> you can find all the code at http://code.google.com/p/guessthenumber/
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to