Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
993 views
in Technique[技术] by (71.8m points)

c# - Windows Phone 8 notifications and background tasks

I have searched the official forums and documentation and all other places, but haven't been able to find a concrete answer.

Q. In Windows Phone 8, is it possible for an application to respond to a Push Notification, and perform a task, while it is in the background?

As far as I can understand, for Toast and Tile Notifications, when the app is not in the foreground, there are no hooks at all for it to be able to respond to the incoming message.

I think "raw notifications" are the correct choice for this, since I am not required to update the app tile, or even show a Toast Notification. But, I haven't been able to find an example, or in the documentations, if I can do this.

I have found several links which talk about doing this for Windows store apps, but I want to find out if this can be done for Windows Phone 8.

I have checked this other thread,

Windows Phone 8 Background Task with notifications

Where one of the answer suggests that Whatsapp actually has a hack for this, to download the messages after a push notification is received. So, is the answer to my question, a NO?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Answer to your question is not exactly "NO", and you are right whatsapp uses hack for this, whatsapp someyow use AudioAgent, as they are allowed to run in background,

i dont know how exactly they do it, i am also searching for the same answer, let's see if i find something will post here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...