在 Windows Phone 应用程序之间共享数据 [英] Share data between Windows Phone apps

查看:32
本文介绍了在 Windows Phone 应用程序之间共享数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找在两个独立 Windows Phone 应用程序之间共享数据的最简单和优雅的方式.

例如,我有两个应用程序:

  1. Input.app - 具有输入字段和保存"按钮的应用
  2. Read.app - 带有标签和读取"按钮的应用.

用例如下:

  1. 用户打开 Input.app,在输入字段中输入内容并按下保存"按钮.
  2. 用户关闭Input.app.
  3. 用户打开 Read.app 并按下读取"按钮.
  4. 标签将填充 Input.app 存储的数据.

注意

我不是在寻找Input.app 调用Read.app(例如使用Tasks)的解决方案.另外,我不是在寻找一种解决方案,其中 Input.app 在线存储数据,Read.app 在应用程序启动时读取数据.

这甚至可能吗?

解决方案

不,目前没有.默认情况下,应用程序是沙盒的,您无法破坏沙盒.应用程序之间只有两种通信方式,但两种方式都不适合您(使用 URI-s 和文件扩展名).

隔离存储是隔离,因此得名.不幸的是,没有共享"存储空间,即使在同一发布者制作的应用程序之间也不存在.

也许这会在即将到来的 Windows Phone 8.1 中改变,谁知道呢.如果需要,您可以访问 http://wpdev.uservoice.com 并请求该特定功能.>

I'm looking for the most simple and elegant way to share data between two separate Windows Phone Apps.

For example, I have two apps:

  1. Input.app - An app with an input field and a "Save"-button
  2. Read.app - An app with a label and a "Read"-button.

The use case will be as follows:

  1. The user opens the Input.app, enters something in the input field and presses the "Save"-button.
  2. The user closes Input.app.
  3. The user opens Read.app and presses the "Read"-button.
  4. The label will get filled with the data stored by the Input.app.

Note

I'm not looking for a solution where Input.app calls the Read.app (for example with Tasks). Also, I'm not looking for a solution where Input.app stores the data online, and Read.app reads the data when the app is launched.

Is this even possible?

解决方案

No, not at the moment. Applications are sandboxed by default and you cannot break the sandbox. There are only two ways of communicating between the applications, but neither will work for you (using URI-s and file extensions).

Isolated Storage is isolated, hence the name. Unfortunately, there is no "Shared" storage, not even between the applications made by the same publisher.

Maybe this will change in the upcoming Windows Phone 8.1, who knows. If you want, you can go to http://wpdev.uservoice.com and request that particular feature.

这篇关于在 Windows Phone 应用程序之间共享数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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