Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-4941

Android: More graceful workaround for Android Bug 2373 & 5277

    Details

      Description

      Description

      Would like to be able to handle this more gracefully, ideally without the dialog.

      Original Description

      From http://jira.appcelerator.org/browse/TIMOB-1559
      When a user installs an application downloaded from the Market or via a website and opens it from the installation success Activity. Pressing Home, then trying to bring the Application back via the launcher in the drawer/home scree or from the recent task menu will cause a new instance of the root activity to appear on the task stack.

      Associated Helpdesk Ticket

      http://appc.me/c/APP-218486

        Issue Links

          Activity

          No builds found.
          jalter Jon Alter created issue -
          jalter Jon Alter made changes -
          Field Original Value New Value
          Hide
          aalderi Mark Aalderink added a comment -

          I hope you will give this high priority. I've got a client that complains about this. And I've seen it mentioned in reviews of apps as a negative.

          Show
          aalderi Mark Aalderink added a comment - I hope you will give this high priority. I've got a client that complains about this. And I've seen it mentioned in reviews of apps as a negative.
          dthorp Don Thorp made changes -
          Labels tbs-1.9.0
          egomez Eduardo Gomez (Inactive) made changes -
          Assignee Don Thorp [ dthorp ] Eduardo Gomez [ egomez ]
          dthorp Don Thorp made changes -
          Assignee Eduardo Gomez [ egomez ] Don Thorp [ dthorp ]
          shossain Shak Hossain made changes -
          Issue Type New Feature [ 2 ] Bug [ 1 ]
          dthorp Don Thorp made changes -
          Labels tbs-1.9.0
          Fix Version/s Sprint 2011-40 [ 12080 ]
          dthorp Don Thorp made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Hide
          dthorp Don Thorp added a comment - - edited

          Pull Request: https://github.com/appcelerator/titanium_mobile/pull/541

          Additional configuration options were added. The values shown below are the defaults.

          "New Settings"

          <property name="ti.android.bug2373.disableDetection" type="bool">false</property>
          <property name="ti.android.bug2373.restartDelay" type="int">500</property>
          <property name="ti.android.bug2373.finishDelay" type="int">0</property>
          <property name="ti.android.bug2373.skipAlert" type="bool">false</property>
          

          "Old Settings"

          <property name="ti.android.bug2373.message">An application restart is required</property>
          <property name="ti.android.bug2373.title">Restart Required</property>
          <property name="ti.android.bug2373.buttonText">Continue</property>
          

          if disableDetection is true, then the workaround is disabled and it will be possible for the app to be launched multiple times if opened first via install then opened from Home.

          restartDelay is the number of milliseconds to wait before launching the app again with the corrected Intent settings.

          finishDelay is the number of milliseconds to wait before telling the original Activity with the incorrect Intent settings to wait before finishing itself (i.e. exit)

          if skipAlert is true, then the AlertDialog will not be displayed and an Android Toast will be displayed with the contents of ti.android.bug2373.message. If the message is set to an empty string, then the Toast will not be displayed.

          Show
          dthorp Don Thorp added a comment - - edited Pull Request: https://github.com/appcelerator/titanium_mobile/pull/541 Additional configuration options were added. The values shown below are the defaults. "New Settings" <property name="ti.android.bug2373.disableDetection" type="bool">false</property> <property name="ti.android.bug2373.restartDelay" type="int">500</property> <property name="ti.android.bug2373.finishDelay" type="int">0</property> <property name="ti.android.bug2373.skipAlert" type="bool">false</property> "Old Settings" <property name="ti.android.bug2373.message">An application restart is required</property> <property name="ti.android.bug2373.title">Restart Required</property> <property name="ti.android.bug2373.buttonText">Continue</property> if disableDetection is true, then the workaround is disabled and it will be possible for the app to be launched multiple times if opened first via install then opened from Home. restartDelay is the number of milliseconds to wait before launching the app again with the corrected Intent settings. finishDelay is the number of milliseconds to wait before telling the original Activity with the incorrect Intent settings to wait before finishing itself (i.e. exit) if skipAlert is true, then the AlertDialog will not be displayed and an Android Toast will be displayed with the contents of ti.android.bug2373.message . If the message is set to an empty string, then the Toast will not be displayed.
          Hide
          dthorp Don Thorp added a comment -

          Testing Notes.

          See TIMOB-1559 for the general test instructions. The cases that should be tested are minimally.

          1) No tiapp.xml settings. Should exhibit current TIMOB-1559 behavior.

          2) disableDetection = true. Should exhibit 2373 and 5277 behavior, basically launch multiple times.

          3) skipAlert = true. Should see Toast with message

          4) Verify "Old Settings" modify dialog and background

          5) Verify message change works when skipAlert = true

          6) Try different restartDelay and finishDelay settings to prove they change

          7) Verify empty message and skipAlert = true does not display a Toast Message.

          Show
          dthorp Don Thorp added a comment - Testing Notes. See TIMOB-1559 for the general test instructions. The cases that should be tested are minimally. 1) No tiapp.xml settings. Should exhibit current TIMOB-1559 behavior. 2) disableDetection = true. Should exhibit 2373 and 5277 behavior, basically launch multiple times. 3) skipAlert = true. Should see Toast with message 4) Verify "Old Settings" modify dialog and background 5) Verify message change works when skipAlert = true 6) Try different restartDelay and finishDelay settings to prove they change 7) Verify empty message and skipAlert = true does not display a Toast Message.
          mculpepper Marshall Culpepper made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Fix Version/s Release 1.8.0 [ 11331 ]
          Resolution Fixed [ 1 ]
          Hide
          thomashuelbert Thomas Huelbert added a comment -

          QE - update packaging test plan with these test steps

          Show
          thomashuelbert Thomas Huelbert added a comment - QE - update packaging test plan with these test steps
          thomashuelbert Thomas Huelbert made changes -
          Labels qe-port
          Hide
          thomashuelbert Thomas Huelbert added a comment -

          closing and tagging for future port

          Show
          thomashuelbert Thomas Huelbert added a comment - closing and tagging for future port
          thomashuelbert Thomas Huelbert made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          penrique Pedro Enrique (Inactive) made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Assignee Don Thorp [ dthorp ] Neeraj Gupta [ ngupta ]
          ngupta Neeraj Gupta made changes -
          Fix Version/s Sprint 2012-05 [ 12097 ]
          Fix Version/s Release 1.8.0 [ 11331 ]
          Fix Version/s Sprint 2011-40 [ 12080 ]
          ngupta Neeraj Gupta made changes -
          Fix Version/s Release 1.9.0 [ 12593 ]
          ngupta Neeraj Gupta made changes -
          Fix Version/s Sprint 2012-05 [ 12097 ]
          Fix Version/s Release 1.9.0 [ 12593 ]
          jalter Jon Alter made changes -
          Reporter Jon Alter [ jalter ] Pedro Enrique [ penrique ]
          Hide
          shossain Shak Hossain added a comment -

          De-escalating it.

          Show
          shossain Shak Hossain added a comment - De-escalating it.
          Hide
          mculpepper Marshall Culpepper added a comment -

          We implement the suggested workarounds already, and have further recently fixed this for Kindle Fire and 3.x devices

          Show
          mculpepper Marshall Culpepper added a comment - We implement the suggested workarounds already, and have further recently fixed this for Kindle Fire and 3.x devices
          mculpepper Marshall Culpepper made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          ngupta Neeraj Gupta made changes -
          Fix Version/s Sprint 2012-06 [ 13170 ]
          ngupta Neeraj Gupta made changes -
          Fix Version/s Release 2.0.0 [ 12593 ]
          wluu Wilson Luu made changes -
          Labels qe-port module_package qe-testadded
          Hide
          wluu Wilson Luu added a comment -

          Closing bug. Verified fix on:

          SDK build: 2.0.0.v20120315070246
          Runtime: v8, rhino
          Titanium Studio, build: 2.0.0.201203142055
          Devices: Droid 1 (2.2.3), Xoom (3.2.1), Kindle Fire

          Show
          wluu Wilson Luu added a comment - Closing bug. Verified fix on: SDK build: 2.0.0.v20120315070246 Runtime: v8, rhino Titanium Studio, build: 2.0.0.201203142055 Devices: Droid 1 (2.2.3), Xoom (3.2.1), Kindle Fire
          wluu Wilson Luu made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Hide
          paul h Paul Hamilton added a comment -

          This alert is now appearing whenever the app is fired from the market, regardless of whether it was launched from the homescreen first.

          Android 2.3.3

          Show
          paul h Paul Hamilton added a comment - This alert is now appearing whenever the app is fired from the market, regardless of whether it was launched from the homescreen first. Android 2.3.3
          Hide
          paul h Paul Hamilton added a comment -

          also, this is particularly hazardous when the user first installs the app. If they try to launch from the notification bar, a common thing to do. The first thing they see is that the application needs to be restarted.

          using SDK 2.0.1.GA2

          Show
          paul h Paul Hamilton added a comment - also, this is particularly hazardous when the user first installs the app. If they try to launch from the notification bar, a common thing to do. The first thing they see is that the application needs to be restarted. using SDK 2.0.1.GA2
          Hide
          paul h Paul Hamilton added a comment -

          also, this is particularly hazardous when the user first installs the app. If they try to launch from the notification bar, a common thing to do. The first thing they see is that the application needs to be restarted.

          using SDK 2.0.1.GA2

          Show
          paul h Paul Hamilton added a comment - also, this is particularly hazardous when the user first installs the app. If they try to launch from the notification bar, a common thing to do. The first thing they see is that the application needs to be restarted. using SDK 2.0.1.GA2
          Hide
          ngupta Neeraj Gupta added a comment -

          @Paul - Please open a new ticket with the exact scenario. This ticket already has several different use cases.

          Show
          ngupta Neeraj Gupta added a comment - @Paul - Please open a new ticket with the exact scenario. This ticket already has several different use cases.
          Hide
          paul h Paul Hamilton added a comment -
          Show
          paul h Paul Hamilton added a comment - Done, see: https://jira.appcelerator.org/browse/TC-908
          ingo Ingo Muschenetz made changes -
          Status Closed [ 6 ] Closed [ 6 ]
          Priority None [ 6 ] High [ 2 ]
          Hide
          buddyguards grebulon added a comment -

          A similar thing happens when launching an app from the lock screen.
          You need to set the lock screen to slide mode, and put your app as one of the shortcuts.
          Now kill the app if it's running, lock the phone and slide to your app. Then lock again and slide again - a second instance will run. Now if you lock again and slide to your app, it will bring the second instance into focus.

          Show
          buddyguards grebulon added a comment - A similar thing happens when launching an app from the lock screen. You need to set the lock screen to slide mode, and put your app as one of the shortcuts. Now kill the app if it's running, lock the phone and slide to your app. Then lock again and slide again - a second instance will run. Now if you lock again and slide to your app, it will bring the second instance into focus.
          nderzhak Nikolai Derzhak made changes -
          Workflow Titanium full [ 90262 ] Copy 12 of Titanium full [ 247347 ]
          nderzhak Nikolai Derzhak made changes -
          Workflow Copy 12 of Titanium full [ 247347 ] Copy 13 of Titanium full [ 291999 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open In Progress In Progress
          60d 21h 36m 1 Don Thorp 08/Oct/11 5:30 AM
          In Progress In Progress Resolved Resolved
          18h 44m 1 Marshall Culpepper 09/Oct/11 12:15 AM
          Closed Closed Reopened Reopened
          7d 21h 23m 1 Pedro Enrique (Inactive) 16/Feb/12 12:45 AM
          Reopened Reopened Resolved Resolved
          25d 1h 22m 1 Marshall Culpepper 12/Mar/12 3:08 AM
          Resolved Resolved Closed Closed
          125d 3h 58m 2 Wilson Luu 15/Mar/12 3:00 AM
          Closed Closed Closed Closed
          826d 2h 46m 1 Ingo Muschenetz 19/Jun/14 5:46 AM

            People

            • Assignee:
              ngupta Neeraj Gupta
              Reporter:
              penrique Pedro Enrique (Inactive)
            • Watchers:
              12 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development

                  Poker Sessions

                  This issue is currently not assigned to any Poker Session.

                    Git Source Code