Ping the Push Notifications backend when the application goes foreground

I thought it was easy, but it wasn't. I had to use 2 kind of callback introduced in API14.