Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26715] Android: App starts without animation when launched with data intent as of 8.0.0

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2019-03-26T13:42:27.000+0000
Affected Version/sRelease 8.0.0
Fix Version/sRelease 8.0.1
ComponentsAndroid
Labelsactivity, android, animation, engSchedule, engTriage, intent, open, resume
ReporterJoshua Quick
AssigneeJoshua Quick
Created2019-01-11T03:26:13.000+0000
Updated2019-03-26T13:42:27.000+0000

Description

*Summary:* As of Titanium 8.0.0, launching/resuming the app using a data intent such as a URL scheme, notification, etc. will cause the app to be opened without any slide-in or fade-in animation. The app will suddenly appear instead. The app will animate normally when launched from the app list screen (ie: the main launcher intent) or via the startActivityForResult() method. *Cause:* Titanium's intent and app resume handling was completely rewritten in 8.0.0 (see: [TIMOB-26075]) in order to resolve "newintent" issues while an app activity instance already exists in the background. It solved it by quickly destroying the activity instance created by the Android OS, resuming the existing activity, and passing the new intent to it. However, this code change completely disabled the open animation in this case so that new activity instance that is being quickly created/destroy won't ever appear onscreen. This was an issue that can be seen on a *+Pixel XL+*, although not all devices showed this behavior such as the Pixel 2. We need to find a better solution where the new activity that is quickly created/destroyed is never shown, but we can preserve the animation for the resumed activity. *Possible Solution:* Do the following instead. I don't think there is a good way to know what the default transition animation is per device (ex: slide-up or fade), but a fade effect seems reasonable.
overridePendingTransition(android.R.anim.fade_in, 0);

Comments

  1. Joshua Quick 2019-01-26

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/10650 PR (8.0.1): https://github.com/appcelerator/titanium_mobile/pull/10651
  2. Satyam Sekhri 2019-03-20

    FR Passed. Waiting for Jenkins build.
  3. Samir Mohammed 2019-03-26

    *Closing ticket.* Fix verified in SDK version 8.0.1.v20190325125116 and SDK Version 8.1.0.v20190325115012 Test and other information can be found at: PR (master): https://github.com/appcelerator/titanium_mobile/pull/10650 PR (8.0.1): https://github.com/appcelerator/titanium_mobile/pull/10651

JSON Source