Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15835] AndroidModule:onResult is not called back for launchActivityForResult when heavyweight window is used

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2013-11-27T20:52:32.000+0000
Affected Version/sRelease 3.1.3
Fix Version/s2013 Sprint 24 API
ComponentsAndroid
Labelsipass1, supportTeam, triage
ReporterRupesh Sharma
AssigneePing Wang
Created2013-11-27T11:53:10.000+0000
Updated2017-03-28T20:22:10.000+0000

Description

Description

I developed a custom Android module. In this module I am opening gallery window using launchActivityForResult, it works fine only in light weight windows. But in heavy weight windows(fullscreen:true, navBarHidden:true,.. ) launchActivityForResult not working. There is no result back in heavy weight windows. onResult method is not called in case of heavyweight window is used.

Test Case

Please find the attached sample project that reproduces the issue.

Attachments

FileDateSize
samplelaunchactivity.zip2013-11-27T11:53:10.000+000091738

Comments

  1. Ping Wang 2013-11-27

    [~rsharma], when the oldActivity.launchActivityForResult() method is called, a new activity (newActivity) is created. You will get the result after newAcitvity is destroyed and *oldActivity is resumed*. In the method launchMyActivity() in the attached module, you use oldActivity=this.getActivity() which returns the activity that creates the SamplelaunchactivityModule. That can be any activity depending on where you require the module. So in your case, you should use oldActivity=TiApplication.getAppCurrentActivity() which will always return the current activity. If you want to use a HW window activity to launch the new activity, you need to call launchMyActivity() after the HW window activity is ready, eg. in the event listener for the "open" event. Resolved the ticket as Invalid.
  2. Eric Merriman 2017-03-28

    Closing

JSON Source