Skip to content

Instantly share code, notes, and snippets.

@kristjanmik
kristjanmik / ti.android.events.js
Last active July 25, 2016 14:58
A proper way to handle pause and resume event in titanium for android
var win = Ti.UI.createWindow({});
win.addEventListener("open", function(e) {
win.activity.addEventListener("resume", function() {
Ti.App.fireEvent('resume')
});
//Notice the pause event
win.activity.addEventListener("pause", function() {
Ti.App.fireEvent('paused')
});