[TIMOB-15554] Android: window activity event not fired
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Not Our Bug |
Resolution Date | 2017-10-31T07:13:38.000+0000 |
Affected Version/s | Release 3.1.3 |
Fix Version/s | n/a |
Components | Android |
Labels | n/a |
Reporter | chua swee siong |
Assignee | Maggie Chen |
Created | 2013-10-21T08:22:57.000+0000 |
Updated | 2017-10-31T07:13:38.000+0000 |
Description
From SDK 3.1.2 onwards, window "create" and "start" not fired when app is launched.
Below is an example launching and closing the app 3 times using SDK 3.1.1 and SDK 3.1.2/3.1.3
app.js
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff',
navBarHidden: true,
exitOnClose: true,
});
win1.addEventListener("open", function(e){
Ti.API.debug("open")
var activity = win1.activity
activity.addEventListener("start", function(){Ti.API.debug("start")})
activity.addEventListener("stop", function(){Ti.API.debug("stop")})
activity.addEventListener("resume", function(){Ti.API.debug("resume")})
activity.addEventListener("pause", function(){Ti.API.debug("pause")})
activity.addEventListener("create", function(){Ti.API.debug("create")})
})
win1.addEventListener("close", function(e){
Ti.API.debug("close")
})
<= SDK 3.1.1
10-21 16:19:15.059: D/TiAPI(1668): open
10-21 16:19:15.069: D/TiAPI(1668): create
10-21 16:19:15.069: D/TiAPI(1668): start
10-21 16:19:15.069: D/TiAPI(1668): resume
10-21 16:19:17.949: D/TiAPI(1668): pause
10-21 16:19:19.919: D/TiAPI(1668): stop
10-21 16:19:20.889: D/TiAPI(1668): close
10-21 16:19:23.139: D/TiAPI(1668): open
10-21 16:19:23.149: D/TiAPI(1668): create
10-21 16:19:23.149: D/TiAPI(1668): start
10-21 16:19:23.149: D/TiAPI(1668): resume
10-21 16:19:25.009: D/TiAPI(1668): pause
10-21 16:19:27.009: D/TiAPI(1668): stop
10-21 16:19:28.529: D/TiAPI(1668): close
10-21 16:19:30.349: D/TiAPI(1668): open
10-21 16:19:30.349: D/TiAPI(1668): create
10-21 16:19:30.359: D/TiAPI(1668): start
10-21 16:19:30.359: D/TiAPI(1668): resume
10-21 16:19:31.729: D/TiAPI(1668): pause
10-21 16:19:33.679: D/TiAPI(1668): stop
10-21 16:19:34.639: D/TiAPI(1668): close
SDK 3.1.2 onwards
10-21 16:22:09.479: D/TiAPI(2219): open
10-21 16:22:16.479: D/TiAPI(2219): pause
10-21 16:22:17.289: D/TiAPI(2219): stop
10-21 16:22:17.559: D/TiAPI(2219): close
10-21 16:22:19.699: D/TiAPI(2219): open
10-21 16:22:21.899: D/TiAPI(2219): pause
10-21 16:22:22.859: D/TiAPI(2219): stop
10-21 16:22:22.859: D/TiAPI(2219): close
10-21 16:22:24.749: D/TiAPI(2219): open
10-21 16:22:26.069: D/TiAPI(2219): pause
10-21 16:22:27.049: D/TiAPI(2219): stop
10-21 16:22:27.059: D/TiAPI(2219): close
Comments
- Maggie Chen 2017-10-31