Hey guys, here i wanna share the way to implement foreground and background event firing.
In appcelerator titanium, we need to wait the first window opened before we register the events. Thats all.
if you want to implement background service trigger after application minimized as happen in iOS, you should use 'stop' event. This is because 'pause' event also fired when ever your window blured.
In android, window blur event triggered when ever a dialog opened or a modal window opened.
So, simple to say here is android puase event equal to window blur event.
Check out the code in my personal repo here.