Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

prevent exitOnClose from stopping the app

$
0
0

My app uses the gcm module to listen for notifications and displays android notifications for every new notification that comes in. Additionally, the current window gets updated with the new count of unread messages.

This window is created using Ti.UI.createWindow({exitOnClose:true})

The problem is, that when the user presses the back button, the application stops. This means, I don't receive any more notifications and thus cannot display them in the notifications bar.

Is there a way to make titanium hide the app when pressing the back button, but not stop it, so that my code stil is running in the background?

I know of the possibility to start a service, but the downside of this is that i cannot update my window, when it's currently visible to the user, since there seems to be no way to communicate between the service and the app. Or is there a way?


Viewing all articles
Browse latest Browse all 8068

Trending Articles