Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android)(7_5_X): Restored pre-7.5.0 behavior where "app.js" should be re-executed when launched via data intent while backgrounded #10678

Merged
merged 1 commit into from Feb 12, 2019

Conversation

jquick-axway
Copy link
Contributor

@jquick-axway jquick-axway commented Feb 6, 2019

JIRA:
https://jira.appcelerator.org/browse/TIMOB-26774

Summary:

  • This resolves a regression introduced in 7.5.0.
    • New issue is that 2nd UI stack will be stuck at the splash screen because "app.js" was already loaded.
    • This PR restores old behavior by re-executing "app.js" explicitly if it's already cached.
    • Note that the old behavior was never intended, but some app developers currently depend on it.
  • This code change is not needed in 8.0.0.
    • Intent handling was refactored so that intents will resume an existing UI stack (like iOS) instead of creating a new UI stack.

Test:

  1. Create a classic Titanium app.
  2. Set project name to "IntentTest". (This is <name/> in "tiapp.xml".)
  3. Set project's "Application Id" to "com.appc.intent.test". (This is <id/> in "tiapp.xml.)
  4. Set up the "app.js" with the below code.
  5. Build and run on Android.
  6. Wait for the app to launch.
  7. Open the Mac "Terminal" app.
  8. CD (change directory) to: ~/Library/Android/sdk/platform-tools
  9. In the terminal, enter the following:
    ./adb shell am start -n com.appc.intent.test/.IntenttestActivity -a android.intent.action.VIEW -d https://www.google.com -f 0x04000000
  10. Verify that the app relaunches successfully.
  11. Verify that "https://www.google.com" is displayed within the text.
  12. Press the device's "Back" button.
  13. Verify that the app exited out successfully. (Should not navigate back to splash screen.)
  14. Build and run the app on iOS.
  15. Verify that the app launches successfully on iOS.
var window = Ti.UI.createWindow();
var text = "Hello World!";
if (Ti.Android) {
	text += "\n\nLaunch Intent:\n" + JSON.stringify(Ti.Android.currentActivity.intent);
}
window.add(Ti.UI.createLabel({
	text: text,
	width: Ti.UI.FILL,
	height: Ti.UI.SIZE,
}));
window.open();

…uld be re-executed when launched via data intent and app is backgrounded
@jquick-axway jquick-axway changed the title fix(android): Restored pre-7.5.0 behavior where "app.js" should be re-executed when launched via data intent and app is backgrounded fix(android): Restored pre-7.5.0 behavior where "app.js" should be re-executed when launched via data intent while backgrounded Feb 6, 2019
@jquick-axway jquick-axway changed the title fix(android): Restored pre-7.5.0 behavior where "app.js" should be re-executed when launched via data intent while backgrounded fix(android)(7_5_X): Restored pre-7.5.0 behavior where "app.js" should be re-executed when launched via data intent while backgrounded Feb 6, 2019
@build
Copy link
Contributor

build commented Feb 6, 2019

Messages
📖

💾 Here's the generated SDK zipfile.

Generated by 🚫 dangerJS

@ssjsamir ssjsamir self-requested a review February 11, 2019 15:48
Copy link
Contributor

@ssjsamir ssjsamir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FR Passed Using the instructions mentioned above.

Test Environment

Google pixel xl 9.0 sim
APPC CLI: 7.0.9
Operating System Name: Mac OS Mojave
Operating System Version: 10.14.2
Node.js Version: 8.9.1
Xcode 10.1

Awaiting CR

Copy link
Contributor

@garymathews garymathews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR: PASS

@ssjsamir ssjsamir merged commit 10be2d6 into tidev:7_5_X Feb 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants