Android multiple activity tasks when application is killed -


the app has 2 tasks of activities:

  • task 1
    • activity (launcher)
    • activity b
  • task 2
    • activity c <---- that's stack points @ in example.

now try that:

  1. go recent apps carrousel (you know clicking button on right of home button in newer phones).
  2. swipe apps out.
  3. your application killed , new application instance created (application#oncreate() called).
  4. android tries show activity c of task 2.

the funny thing if you're here:

  • task 1
    • activity (launcher)
    • activity b <---- here

...and repeat scenario, application killed , android goes home screen think should.

in short, looks android not clear tasks when killing application. true in precise scenario. go settings > applications > app > force stop, , see clear tasks.

anything can force android kill tasks when killing application?

after looking @ how recent apps handled on android sdk (see source here line 135 http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.1_r1/com/android/systemui/recent/recenttasksloader.java?av=f#135)

i understood (and tested) if provide activity c icon , label such:

<activity     android:name=".activityc"     android:label="activity title"     android:icon="@drawable/ic_icon" </activity> 

you see 2 apps (tasks really) in recent apps carrousel.

now i'm thinking use case should not use different tasks because it's seen app android's standpoint.


Comments

Popular posts from this blog

Issues changing the value of an element in an array in matlab -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

vb.net - Alternative to the T-SQL AS keyword -