Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1545] Android: Unusual behavior when opening an app immediately after installing it

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:56:28.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0
ComponentsAndroid
Labelsandroid, defect
ReporterBill Dawson
AssigneeBill Dawson
Created2011-04-15T02:55:42.000+0000
Updated2011-04-17T01:56:28.000+0000

Description

When you install an app, you get the option at the end of the installation to touch "open" (to run the app) or just "done". If you choose open and start the app, it behaves differently in terms of pause/resume than an app that you open from the normal applications list. (See also helpdesk ticket 35861.)

  1. Use the native android browser go enter a URL to an APK on the internet.

  2. After it's downloaded, click on the apk to install

  3. On post install screen click 'open'

  4. After the app loads, click the home button

  5. Go to the list of applications, find the one you just installed and click it to open it again. You will see splash screen again instead of being brought back into app in previous state.

  6. repeat 4 and 5 a few times

After doing it a few times, start clicking the back button, and you'll end up backing through a bunch of instances your app's main screen.

None of this weird stuff happens if you do not click 'open' upon completing the installation of the app but rather go start the app for the first time using the normal applications list.

If you click back a bunch of times you will see multiple instances of the getglue app and splash screen

Comments

  1. Bill Dawson 2011-04-15

    "Normal" start of an application looks like this:

       I/ActivityManager(   97): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.billdawson.testanything/.TestanythingActivity }
       I/ActivityManager(   97): Start proc com.billdawson.testanything for activity com.billdawson.testanything/.TestanythingActivity: pid=6935 uid=10097 gids={3003, 1015}
       

    Starting an app from the 'open' button post-installation looks like this:

       I/ActivityManager(   97): Starting activity: Intent { act=android.intent.action.MAIN flg=0x10000000 cmp=com.billdawson.testanything/.TestanythingActivity }
       I/ActivityManager(   97): Start proc com.billdawson.testanything for activity com.billdawson.testanything/.TestanythingActivity: pid=6857 uid=10097 gids={3003, 1015}
       

    So the only difference appears to be the 'flg': 0x10000000 when loading from 'open' button post-installation, 0x10200000 when launching 'normally' from application list.

  2. Bill Dawson 2011-04-15

    The post-installation 'open' button's launch flag of 0x10000000 corresponds to http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_NEW_TASK"> FLAG_ACTIVITY_NEW_TASK.

    The standard launch flag 0x10200000 corresponds to that (above) plus http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_RESET_TASK_IF_NEEDED"> FLAG_ACTIVITY_RESET_TASK_IF_NEEDED.

  3. Don Thorp 2011-04-15

    This is a duplicate of #1559, but existed first. Since the fix has already been checked in for #1559 please verify that this isn't a special case that still needs attention.

  4. Thomas Huelbert 2011-04-15

    huh, thought I closed this on sat - anyway 1.5.0.70ce98 g2 and g1

JSON Source