【问题标题】:Directly reading sensor data by paring Band 2 and PC (windows 8.1) still needs an emulator通过配对 Band 2 和 PC (windows 8.1) 直接读取传感器数据仍然需要模拟器
【发布时间】:2016-02-11 03:10:02
【问题描述】:

我必须从 Band 读取传感器数据。我做了搜索,变得更加困惑。似乎有一种方法可以通过蓝牙与桌面(Windows 8.1)连接,直接从 Band 读取数据。当我运行一个示例时,它会返回一条错误消息,例如“部署失败”。没有检测到 Windows Phone。

是否可以通过这种方式从 Band 2 读取传感器数据?

  1. 软件环境:VS2015社区-Blank App(通用windows);
  2. 硬件环境:Band 2,桌面;
  3. 通过蓝牙将 Band 2 与桌面配对;

不涉及 windows phone 和 windows phone 模拟器。未使用 Microsoft Health 应用程序。 如果可以,我可以在网上找到示例代码吗?

还是应该这样?

  1. 软件环境:VS2015社区-Blank App(通用Windows 8.1),windows phone emulator,Hyper-V也是必需的;
  2. 硬件环境:Band 2、桌面、windows phone;
  3. 通过蓝牙将 Band 2 与 windows phone 配对;
  4. 在 windows phone 上运行示例;

windows phone 和 windows phone emulator 都参与其中。Microsoft Health 应用未使用。

【问题讨论】:

    标签: c# windows-phone windows-store-apps microsoft-band


    【解决方案1】:

    您可以通过以下两种方式之一使用 Band SDK:

    1. 在 Windows Phone 上运行的 Windows Phone 8.1 或 10(通用)应用程序中,手环与手机蓝牙配对。

    2. 在 Windows PC 上运行的 Windows Store 8.1 或 10(通用)应用程序中,手环通过蓝牙与 PC 配对。

    无论使用何种硬件,Band SDK 都是相同的,因此任何示例都应该没问题。

    请注意,当您的应用程序在 Windows Phone 模拟器中运行或应用程序在 Windows 模拟器中运行时,您不能使用 Band SDK。

    【讨论】:

    • 感谢您的及时回复,这对我有很大帮助!我很感激你与我们分享你的智慧。我还有问题希望您能提供帮助。
    • 对于选项 1,我是否需要注册我的 Windows Phone 8.1 或 10 以进行 Windows Phone 开发(这里有一篇文章:如何为 Windows Phone 8 部署和运行应用程序)?然后我可以直接在 Windows 手机上运行该应用程序。
    • 对于选项2,我之前试过。我通过蓝牙将 Band 与 Windows PC (OS 8.1) 配对,然后运行 ​​Windows Store 8.1 应用程序从 Band 2(无模拟器)读取数据。我最终收到第一条错误消息“有部署错误。继续?”。如果我点击继续,我得到“引导‘设备’失败。找不到设备。部署失败 b/c 未检测到 Windows Phone。确保手机已连接并开机”。为什么我得到这些错误?再次非常感谢菲尔!
    • 对于Windows 8.1,是的,我相信您需要在将应用程序部署到手机之前“开发人员解锁”手机;这可以通过 Visual Studio 附带的开发人员注册实用程序来完成。对于 Windows 10,我相信“开发者模式”可以简单地在手机的设置中启用。很难说,但从您提供的错误消息来看,Visual Studio 似乎正在尝试部署到真实手机,而不是作为 Windows 应用商店应用程序运行。确保您已正确选择部署目标。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-12-11
    • 2017-09-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多