[TIMOB-26703] TiAPI: Add Ti.App "started" event
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-01-09T18:28:41.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 8.0.0 |
Components | n/a |
Labels | App, Windows, android, event, iOS, started |
Reporter | Joshua Quick |
Assignee | Joshua Quick |
Created | 2019-01-08T03:39:49.000+0000 |
Updated | 2019-01-09T18:28:45.000+0000 |
Description
*Summary:*
Add
Ti.App
event "started" to be fired just after the "app.js" or "alloy.js" has been executed.
*Reason:*
Native startup related events need to be deferred until after the "app.js" or "alloy.js" has had a chance to set up listeners for them. A "started" event is the clue needed to determine when this happens.
This is especially needed once Titanium starts displaying JavaScript bootstrap UI, which is a script which prevents the "app.js" from being loaded until the bootstrap finishes its job. This is something we plan on doing in the near future with Google Play Services to ensure it is installed/enabled before proceeding to load the rest of the app.
*Note:*
This feature was already implemented in Titanium 8.0.0 by [TIMOB-26075] via the code change [here](https://github.com/appcelerator/titanium_mobile/commit/b2b3e328bd18ef0a7e7bed4d5c530abdd881ab81#diff-722bd9f159d5a9feed5efb028c22ab04). We just need to document it.
PR (master): https://github.com/appcelerator/titanium_mobile/pull/10578
PR (8.0.x): https://github.com/appcelerator/titanium_mobile/pull/10585
FR Passed.