Windows Phone 7中的后台服务 [英] Background service in windows phone 7

查看:68
本文介绍了Windows Phone 7中的后台服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Windows Phone7中创建后台服务(守护程序)?该服务应执行以下操作

how can I create a background service(demon) in windows phone7?The service should do the following

1)应该订阅事件,以了解网络连接是否可用.
当网络可用时,应使用rest api将文本发布到Web服务器,否则缓冲文本

1)Should subscribe to events to know whether network connectivity is available or not.
When network is avaible it should post text to web server using a rest api,else buffer the text

2如果被关闭,应该引发一个事件.如果操作系统尝试关闭该服务,则该服务应将缓冲的文本保存在独立存储中

2Should raise an event if its being shut down.If OS attempts to shut down the service then the service should save the buffered text in isolated storage

如果应用程序未运行,我的应用程序应该能够启动它.

My application should be able to launch the service if its not running.

在OS 7.0中有什么方法?在芒果后台转移服务中有什么方法?

Is there a way of doing this in OS 7.0?What is the way of doing this in Mango, Background tranfer service?

推荐答案

在OS 7.0中无法执行任何后台服务.

There is no way to do any background services in OS 7.0.

在7.5中,您具有 后台代理.但是,它们无法按照您想要使用它们的方式工作.

In 7.5, you have Background Agents. However, they don't work they way you are wanting to use them.


这篇关于Windows Phone 7中的后台服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆