Project: titanium
Issue TIMOB-20490: Android: Apps should be able to open/resume and respond to intents
As a developer, I want my app to be able to open or resume (from background) in response to intents like launcher shortcuts (TIMOB-20459) or custom URL schemes (TIMOB-15253) and receive that intent so I can perform logic depending on the intent. h4. Primary user stories * If my app is not running it should be opened and I should be able to get the intent form {{Ti.App.Android.launchIntent}}. * If my app is already running it should be brought to the foreground and fire an event ({{Ti.App.Android:intent}}?) that has a reference to the intent. {{Ti.App.Android.launchIntent}} should also be updated to reference the new intent. (TIMOB-20459) h4. Secondary technical stories * If my app is already running (in another stack) no new instance should be created and pushed the current stack (that fires the intent). Instead the existing stack must be brought to the foreground with the activity on top. (TIMOB-15253) * If my app is already running and several new Activities (windows) have opened over the original Activity (window) I must still be able to receive the event ({{Ti.App.Android:intent}}?) for the new intent and not be required to add listeners to the activity of every single window I open ({{Ti.UI.Window.activity:newintent}}). * Opening my app via an URL scheme should not require any [additional flags or the intent scheme|https://jira.appcelerator.org/browse/TIMOB-15253?focusedCommentId=271897&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-271897]. h4. Test scenarios In all of these make sure both apps are several Activities (windows) deep. * Create two apps where one opens the other using an intent * Create an app that creates an additional launch shortcut to open itself (TIMOB-20459) * Register a custom URL scheme and open that via email (TIMOB-15253) Let's discuss if I forget something before we solve this once and for all.
Story points: 21