问题标签 [pebble-sdk]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
4 回答
6694 浏览

pebble-watch - Pebble Watch Faces

I'm trying to create my own Pebble watch faces. It appears no one has done this yet and there's no SDK.

So far I've figured out that the watch faces are hosted here: http://pebble-static.s3.amazonaws.com/watchfaces/index.html

Each watch face is a .pbw file which is a zip file. There's 3 files inside: app_resources.pbpack, manifest.json and pebble-app.bin.

The JSON file includes a list of all the parts of the watch face (images), which appears to be an app. The .bin file is probably the executable binary and the .pbpack file is probably a bundle of all the resources. I can't figure out how to extract the .pbpack file. I'm also not sure what to do with .bin file.

I'm trying to post my progress here: http://hackingpebble.tumblr.com

Any thoughts on what to do with the .pback and .bin files?

0 投票
1 回答
1839 浏览

java - 向 Pebble 发送通知

我正在尝试向我的卵石手表发送通知。我正在使用此代码,这基本上是网站上的示例

我在 LogCat 中收到消息,但手表上没有通知。该程序似乎很简单,我错过了什么太明显的东西吗?还是文档不完整?

编辑:显而易见的问题:

  • 是的,手表已连接
  • 是的,我启用了第三方通知
0 投票
3 回答
988 浏览

android - 使用 PebbleKit 向 Pebble 发送布尔值

我从来没有真正做过太多的 C 并且对于从 Android 应用程序向 Pebble Watch 发送布尔值的最佳方式感到有些困惑。

我的字符串工作正常,但 PebbleDictionary 上似乎没有 addBoolean 方法。作为一种解决方法,我尝试使用 addUint8 发送 1 或 0,但在处理 Pebble 上的消息时遇到问题。

这是我的安卓代码:

在我的 Pebble 中,我有一个数据结构:

然后我试图在我的 sync_tuple_changed 回调中像这样比较它。

手表不会崩溃,只是在手机掉落或获取 GPS 时不会振动。

0 投票
3 回答
1372 浏览

c - 如何在 Mac OS X 上安装 Pebble SDK

我正在按照http://developer.getpebble.com/1/GettingStarted/MacOS/
安装 Pebble SDK, 但是当我运行时 brew doctorbrew install libmpc它总是说Error: Cannot write to /usr/local/Cellar.

我以为我没有写权限,我已经运行sudo chown -R $USER /usr/local 但它不起作用。

如何安装 libmpc?

0 投票
1 回答
1182 浏览

pebble-watch - 访问 pebble 上 AppMessage 数组中的字符串

我正在构建一个连接互联网的比特币应用程序。观看来自不同比特币市场的股票信息。一切正常。现在我想将可用市场列表发送到手表以显示为菜单。要发送的 JSON:

{"markets": ["MtGox", "BitStamp","BTCChina"]}

“市场”在“appinfo.json”中正确键入,所以这不是问题。

如何在 Pebble 上访问此数组中的元素(单个字符串)?我已经看过直接访问整数和字符串的示例,这些示例效果很好,有什么好的示例吗?我还没有找到。

0 投票
2 回答
4127 浏览

c - 如何在 C 中使用 Pebble SDK 将 int 转换为字符串

刚拿到我的 Pebble,我正在玩 SDK。我是 C 新手,但我知道 Objective-C。那么有没有办法创建这样的格式化字符串?

而且我不能使用sprintf,因为没有malloc

我基本上想显示int一个text_layer_set_text(&countLayer, i);

0 投票
0 回答
597 浏览

c - c pebble sdk 2.0中的文本自动滚动

我正在尝试在屏幕中自动滚动文本。(如 html 水平选框)我尝试 了http://cboard.cprogramming.com/cplusplus-programming/65998-how-scroll-your-text.html 但它不起作用。我怎么能用 pebble sdk 2.0 做到这一点?卵石代码:

Pebble cloudpebble.net 的在线 IDE 谢谢

0 投票
4 回答
2066 浏览

c - snprintf + Pebble

我正在为 Pebble 进行开发,但起步并不顺利。

我正在尝试用 2 个字符串和 2 个值填充 text_layer,如下所示:

等待平均:3 最大:5

由于Pebble SDK 不支持,所以我malloc不能使用. 以下代码仅打印“4”:sprintfsnprintf

任何帮助将不胜感激。我知道我可以创建 4 个单独的 TextLayers,但这对我来说是最后的手段。

0 投票
1 回答
1135 浏览

android - 将 pebblekit 库添加到 android studio

我对 Android Studio 很陌生,所以我真的不知道如何将库(不是 jar 文件,只是一个普通目录)添加到我的 android 项目中。更确切地说,它是我要添加的 pebblekit 库。

我一直在尝试自己做这件事一段时间,并在互联网上搜索没有任何好的结果。我正在使用 0.4.2 的 Android Studio。

也许有人可以告诉我该怎么做?

0 投票
1 回答
2078 浏览

c - 在 pebble watch 上记录枚举

当我像这样在 Pebble 上记录错误时:

我只是得到错误消息的 int 值。有没有一种简单的方法来记录枚举的文本?喜欢: