I have an App targeted for WP7
and the push notification
which triggers sqlite
code to insert messages into sqlite DB
. This works fine when the App is in the foreground, but not work when App is the background.
What is the best approach to take so that when user received push notification
, it can execute sqlite
code in the background?
I read up on background agent
, but wasn't sure how background agent
can receive data from push notification
.
Any example or idea will be very helpful.
I don't believe this is possible. As a work around, I will store all messages on the server. When user first start the app, it will automatically download messages from cloud to sqlite. Then, only pusbh notification received will trigger data refresh from cloud.