【问题标题】:Pebble only accepts data for the first timePebble 首次只接受数据
【发布时间】:2014-12-30 06:36:03
【问题描述】:

我为 android 开发了一个 pebble 伴侣应用程序,当我第一次向 pebble 发送数据(Android 应用程序到 pebble 手表)时,它被接受/接收并正确显示在 pebble 手表上。但是在我完成会话并尝试再次向 pebble watch 发送数据后,pebble 无法接收/接受它。虽然 pebble 应用程序启动,但它不接受数据。加上问题,控制台上没有显示错误日志。

任何帮助将不胜感激。谢谢。

【问题讨论】:

  • 你能发布一些你的代码吗?当您说“发送数据”时,您是指通过 AppMessage 吗?
  • 是的,我正在使用“PebbleKit.sendDataToPebbleWithTransactionId(appContext, pebAppId, pdHead, 0);”发送数据

标签: java android pebble-watch pebble-sdk


【解决方案1】:

你怎么知道你没有收到任何东西?您的in_received 处理程序中有日志吗?

要调试此类问题,您需要确保您的 appmessage_in_dropped 处理程序中有一条日志语句。

您可以使用my answer in this question 将错误消息转换为日志中的可读字符串。 Full example here.

【讨论】:

    猜你喜欢
    • 2018-08-20
    • 1970-01-01
    • 1970-01-01
    • 2016-11-07
    • 2014-09-17
    • 2014-09-27
    • 2021-12-15
    • 2011-04-17
    • 2017-08-07
    相关资源
    最近更新 更多