将Nuget包安装到Windows Phone计划任务代理 [英] Install Nuget package to Windows Phone Scheduled Task Agent
问题描述
我有一个应用程序,显示用户今天固定显示的注释,并将我的所有数据保存到服务器,parse.com
我试过使用 ShellTileSchedule
,但它不允许我使用自定义代码进行更新(例如:无法使用与服务器的连接)。
后来我发现 ScheduledTaskAgent
,它非常适合在后台运行。但出于某种原因,当我调试它时,它崩溃了。当我删除parse.com包并删除所有代码并插入测试代码时,它不会崩溃。我认为这可能是由于parse.com包, ScheduledTaskAgent
不支持它。
我想要用网络连接更新我的应用程序磁贴。 parse.com有REST API,无论如何都要这样做吗?
我正在运行Express Visual Studio 2013 for Windows,正在开发Windows Phone 8应用程序
I have an application that display what notes that user's have pinned to display today, and all my data saved to a server, parse.com
I tried to use ShellTileSchedule
, but it does not let me update with custom code (eg: cannot use connection to server).
Later I found ScheduledTaskAgent
, it was great for running at background. But for some reason, when I debug it, it crashed. When i remove parse.com package and remove all code and insert testing code, it doesn't crash. I think it might due to parse.com package, ScheduledTaskAgent
doesn't support it.
I wanted to update my application tile with network connection. parse.com has REST API, is there anyway to do it?
I'm Running Express Visual Studio 2013 for Windows, developing Windows Phone 8 Application
推荐答案
使用ScheduledTaskAgent
下载数据时可能会出现问题。
ScheduledTaskAgent
适用于后台线程。
因此,如果您使用WebClient
要在这个帖子上下载数据,就会出现错误。
你必须使用HttpWebRequest
。
There could be a problem the way you download data usingScheduledTaskAgent
.
ScheduledTaskAgent
works on a background thread.
So if you are usingWebClient
to download data on this thread, there will be errors.
You have to useHttpWebRequest
.
这篇关于将Nuget包安装到Windows Phone计划任务代理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!