[TIMOB-15835] AndroidModule:onResult is not called back for launchActivityForResult when heavyweight window is used
GitHub Issue | n/a |
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2013-11-27T20:52:32.000+0000 |
Affected Version/s | Release 3.1.3 |
Fix Version/s | 2013 Sprint 24 API |
Components | Android |
Labels | ipass1, supportTeam, triage |
Reporter | Rupesh Sharma |
Assignee | Ping Wang |
Created | 2013-11-27T11:53:10.000+0000 |
Updated | 2017-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
[~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.
Closing