Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14984] Android: Activity doesn't react to create, start, resume, or newintent events preventing interapp sharing of data

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2013-10-10T19:55:37.000+0000
Affected Version/sRelease 3.1.2
Fix Version/s2013 Sprint 22, 2013 Sprint 22 API, Release 3.2.0
ComponentsAndroid
Labelsregression
ReporterTim Poulsen
AssigneePing Wang
Created2013-08-28T13:22:34.000+0000
Updated2017-03-22T22:08:41.000+0000

Description

This is a regression. The code in question worked in 3.1.1.

Scenario

I have two apps. One launches the other using openURL() and optionally passing launch arguments.

Expected results

Target app receives the intent, accesses URL parameters sent by using activity.getIntent().getData() and uses them to take appropriate action.

Actual results

Using Titanium 3.1.2, the source app can open the target app. But, the create event doesn't fire. So I can't grab the payload (the URL parameters) and execute the desired function. "Source" app: https://github.com/appcelerator-training/tce_training/tree/master/labcode/Finished_code/08_source "Target" app: https://github.com/appcelerator-training/tce_training/tree/master/labcode/Finished_code/URLSchemes Things I've tried that didn't solve the problem: * Make the app's window heavyweight * Put the code within window.addEventListener('open', function() {// code here}) * Use the window open listener, pass in an event object, try grabbing a handle to the activity from e.source.activity (window was heavyweight) * Tried listening on the activity's newintent, resume, and start events instead of create * Added android:launchMode="singleTask" to the activity's definition in tiapp.xml The code as written worked fine in 3.1.1 (and a couple SDKs prior to that too). Downgrading from 3.1.2 to 3.1.1 is all it takes to "fix" the code.

Attachments

FileDateSize
Archive.zip2013-08-29T13:35:10.000+000011576643

Comments

  1. Tim Poulsen 2013-08-28

    Possibly related to TIMOB-14520 per conversation with Ping
  2. Ping Wang 2013-08-28

    [~skypanther], it seems I have no permission to clone the two apps you mentioned in the ticket. I submitted a PR for TIMOB-14520 https://github.com/appcelerator/titanium_mobile/pull/4622. Can you try it to see if that also solve your issue?
  3. Tim Poulsen 2013-08-29

    I hate to admit I'm a dummy and don't know how to pull an unmerged branch then build our SDK. But, that's the way it is. I've attached a zip to this ticket containing the two projects. These worked in class using 3.1.1GA. They don't contain any new code from the various attempts I've made to resolve this issue in 3.1.2.
  4. Lee Morris 2017-03-22

    Closing ticket as duplicate and links to the related ticket have been provided above.

JSON Source