问题描述
当我单击Windows按钮时,我想在后台运行我的应用程序.基本上,我有一些XMPP方法,当我进入后台时,它会将其状态和状态从在线更改为离线.我希望它在后台运行.只是由于状态为离线,所以我无法从XMPP接收任何吐司通知.
I want to run my application in background when i click on windows button.Basically I have some methods of XMPP and when I goes to background it changes its status and presence from online to offline. I want this to be run in background.Just because of the status is offline I am not able to receive any toast notification from XMPP.
如果有人对XMPP有所了解,请也帮助解决该问题.
任何帮助将不胜感激.
Any help will be much appreciated.
谢谢,Nishant
Thanks,Nishant
推荐答案
您不能使您的应用在后台运行.我认为其他IM应用程序使用推送机制.因此,您需要一台服务器,当您退出应用程序时,您告诉服务器使用户看起来仍然在线,并且当有消息到达该用户时,您会向该设备发送推送通知.当用户点击推送通知弹出窗口时,您的应用程序将启动.
You cannot make your app run in the background. I think that other IM apps use a push mechanism. So you need a server, when you app is exited, you tell the server to make the user seem still online and when a message arrives for the user, you send a push notification to the device. Whne the user taps the push notifictaion popup, your app will be started.
这篇关于如何在Windows Phone的后台运行我的应用程序或某些特定方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!