What flag did you put to your activities when you call them and is there 
any options in your application? From my experience, activity behaviour can 
be quite different what flags you gave to your and AndroidMenifiest file 
and activities.

On Wednesday, November 7, 2012 11:59:55 AM UTC+11, Evan Ruff wrote:
>
> Hello all,
>
> I'm having some very frustrating and confusing issues getting my 
> application to function as it has been. My application uses an Application 
> object to hold a user object. This object is large and is loaded from the 
> database and held in the Application singleton (MyApplication extends 
> Application) by an async task in my .Splash activity. All activities 
> subclass a BaseActivity that checks for the existence of this user. If the 
> user is not present, it finish()es the activity and finishes all the way 
> back to the Splash screen, where the user is loaded from the DB.
>
> The splash activity looks like this:
>         <activity
>             android:name=".Splash"
>             android:label="@string/app_name"
>             android:screenOrientation="portrait" >
>             <intent-filter>
>                 <action android:name="android.intent.action.MAIN" />
>
>                 <category android:name="android.intent.category.LAUNCHER" 
> />
>             </intent-filter>
>         </activity>
>
> This application has been deployed in various forms all the way since 1.5. 
> In the past, let's say you were working in the application on an Activity 
> four down the stack. You hit home/phone call/whatever and, when the 
> application returns, the onResume activity picks up the user from the 
> Application and everything works as normal. I am not getting this behavior 
> anymore. On my MyTouch running 1.6, it works as expected. Whatever Activity 
> was previously on top of the stack is loaded and onResume called.
>
> All of a sudden, I am not seeing that behavior.
>
> On my Galaxy Nexus, it does not work as expected. On the GNexus, if I hit 
> HOME then hit the Launcher icon, sometimes, the Application is clobbered 
> and the fall through happens. Other times, it goes right back to the 
> launcher .Splash activity. If I hit HOME, then hit the recent apps, it 
> works fine. Looking at LogCat output, it doesn't seem to try to resume at 
> all if I hit the Launcher button.  I have tried launchMode=singleTop, but 
> that doesn't seem to work.
>
> And here's even the crazier part... if I deploy the application from the 
> debugger over ADB... WITHOUT ANY CODE CHANGES, I get the behavior I'm 
> expecting and have gotten in the past. The last activity pops up as usual, 
> onResume executed and the application can find the Application. This holds 
> true even if I disconnect the debugger, restart the phone, and just use the 
> application that way. The problem occurs when I compile, deploy and install 
> the APK directly.
>
> I'm quite baffled by this behavior. Has anyone else had this sort of 
> scenario?
>
> I'd appreciate any help anyone could provide.
>
> Thanks!
>
> Evan
>

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