That little bit of code I added was trying to fix the problem, but it
obviously didn't work.  Should this issue most likely be coming from
the manifest file?  One thing I did notice was that after I left my
app alone for a little while (while in class) and then opened it, it
was restoring everything correctly.  I reinstalled and the issue was
back, so it seems this is only a problem right after installation.

Here is my androidmanifest.xml (with some name changes to protect my
code :D) to see if I'm missing something I should have put in there:


<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android";
      package="myPackage"
      android:versionCode="5"
      android:versionName="0.05">
    <application android:icon="@drawable/icon" android:label="@string/
app_name">
        <activity android:name=".Main"
                  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="myPackage.Activity1"></activity>
        <activity android:name="myPackage.Activity2"></activity>
        <activity android:name="myPackage.Activity3"></activity>
        <activity android:name="myPackage.Activity4"></activity>
    </application>
</manifest>


On Mar 10, 12:57 pm, Dianne Hackborn <[email protected]> wrote:
> What you are saying you want is how applications behave by default (try
> using the standard applications to see).  You must have done something
> different, more than the small snippet of code you included.
>
>
>
> On Tue, Mar 10, 2009 at 8:44 AM, Hayden <[email protected]> wrote:
>
> > I want my application to resume what it is doing regardless of where I
> > press the icon (Home screen, app picker, or running apps).  Right now
> > if my app is in the background and I press the icon on the home
> > screen, the app restarts with my Main Activity.  Once here, if I press
> > the back button the app resumes from the activity it left off before
> > it was put in the background.  If it's running in the background and I
> > hold the home button and select my app from the current running apps,
> > it resumes correctly.
>
> > How do I avoid my app from going to my Main activity when it is
> > selected from the Home screen or app picker?  I have tried adding the
> > following in my Manifest XML file, but it doesn't help:
>
> > <activity android:name=".Main"
> >                          android:launchMode="singleTask"
> >                          android:alwaysRetainTaskState="true"
> >                  android:label="@string/app_name">
>
> > Any help would be greatly appreciated!
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  All such questions should be posted on public
> forums, where I and others can see and answer them.
--~--~---------~--~----~------------~-------~--~----~
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