我正在尝试访问我的windows phone存储空间中的文件。我知道它们是完全独立的,因为一个是windows phone应用程序,另一个是windows运行时组件。
public void Run(IBackgroundTaskInstance taskInstance)
{
BackgroundTaskDeferral _defferal = taskInstance.GetDeferral();
System.Diagnostics.Debug.WriteLine("Starting Offline Functionality");
_defferal.Complete();
}此方法在网络状态更改时运行。从这里我想访问手机存储。以前有没有人这样做过,或者能想出任何解决办法?
我正在使用windows phone 8.1运行visual studio 2012。
发布于 2014-10-08 22:54:43
可以,停那儿吧。建议使用独立存储在后台任务和前台应用程序之间传递数据。您可以使用互斥锁,以防止两个进程在它们同时运行时相互干扰。
请参阅MSDN的Communication between foreground app and background agent和快速入门:Working with files and folders in Windows Phone 8
https://stackoverflow.com/questions/26259469
复制相似问题