My app uses urban Airship
for its push notification.
The problem starts when a user "force" closes
the app (by sliding it away in the multitasking window or in the settings). When a push arrives, it gets to urban airship's receiver and they are broadcasting an intent for my app to use. So, if the app is forced closed then my receiver will not be activated and I can't receive the broadcast.
I know about Intent.FLAG_INCLUDE_STOPPED_PACKAGES
but I cant use it because urban is doing the broadcast and its in a jar file.
A fix could be that I keep my app in a running state all time, even if the user closes it. How can I do that? I see that What's app is doing that. Is there another solution?
P.S. I know that android is build in a way that when a user force closes an app he "wants" it to deactivate it's receivers, but it's not the same for push notification, push notification will still get through. I only want my app to "live" so I can receive the push. Thanks!