03-16-2011 07:54 PM
I have some questions how you're dealing with some aspects of pushenabled client apps (OS 5, OS 6)
application implements PushApplication and then onMessage() or onStatusChange() are called from PushService for incoming messages.
if the application isn't running, then push services instantiate the app
so far so good, but some questions:
starting app 1st time -> register at content provider and push service
and immediately the app can receive messages
user quits application -> push messages are received -> app automagically started in background
in this case I have to carefully think about application startup.methods, because immediately after instantiating the app, onMessage() was called. in most cases at this time not all app-initializing was done.
so I have to buffer the incoming messages until I'm ready to process them
if I would have declared the app as auto-startup-app, then if user quits, the app would go into the background waiting there for messages. if they receive, no initializing work has to be done.
running apps autostarted and always moving to background if closing is some overhead for the system, but not auto-starting and then at autostart to do initializing again is also some overhead
also - if not autostarting and app was instantiated in background because of receiving push messages, the app remains in background. so I have to implement some logic to exit the app if sits in background waiting an amount of time for next messages.
How are you using this ? auto-started or always-again-started-as-receiving-incoming-message
Communication API doesn't work for me:
unfortunately got no answers from forum or issuetracker
03-17-2011 04:10 AM
03-17-2011 04:16 AM
that's also my opinion to go this way...
just wanted to hear from others outside there if this is the recommended way