[AC-2356] Android pause/resume activity events do not fire inside TabGroup
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2013-01-29T01:10:45.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | 3.0.0.GA, Activity, Android, pause, resume |
Reporter | Mark Mokryn |
Assignee | Mauro Parra-Miranda |
Created | 2013-01-16T10:23:19.000+0000 |
Updated | 2016-03-08T07:41:22.000+0000 |
Description
The issue is well described inside the Q&A including code from Kitchen Sink 3.0.
event listeners for Android activity pause and resume events do not fire on the TabGroup nor on its windows, and the listeners have been positioned inside the respective "open" event handlers for good measure. The release notes for SDK 3.0.0 mention changes for TabGroup activities - but these are also not reflected in the 3.0 SDK docs. Here is the link to the relevant Q&A:
[http://developer.appcelerator.com/question/146990/android-tabgroup-activity-pauseresume]
I found the problem: from all my testing, the only apparent way to get the activity object while inside the TabGroup is to use the TabGroup.getActivity() method. The Ti.Android.currentActivity does not work, as apparently don't the window properties/methods. The 3.0 SDK release notes state that TabGroup.activity property is available - yet this is not true. In short - all the documentation for Android activity management/events should be seriously reviewed for 3.0 - it's very confusing at the moment.
DUP issue.