I am not sure whether you will get different results in the device.

It will behave the same way AFAIK.


When ever home button is pressed your Child activity is being
finished...There is no way it will behave differently on the device.

On Thu, Apr 9, 2009 at 12:35 PM, Omer Saatcioglu <osaatcio...@gmail.com>wrote:

>
> Actually, this code is a work around to get rid of the problem.
> However; I think I found the root cause of my problem at
> stackoverflow.com. I asked the same question and they told me that
> there is a bug in emulator:
> http://code.google.com/p/android/issues/detail?id=2373
>
> I think that all I need to do right now is clean the save/restore
> state codes from my project and run the signed copy directly on my
> device.
>
> Thank your for your kind help.
>
>
> On Apr 9, 8:58 am, for android <forandr...@gmail.com> wrote:
> > 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 <osaatcio...@gmail.com
> >wrote:
> >
> >
> >
> >
> >
> > > On Apr 7, 8:22 pm, Marco Nelissen <marc...@android.com> wrote:
> > > > On Tue, Apr 7, 2009 at 10:04 AM, Omer Saatcioglu <
> osaatcio...@gmail.com>
> > > 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 athttp://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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to