问题标签 [pebble-watch]

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 投票
3 回答
6393 浏览

ios - 如何接收其他应用程序的推送通知?

你们中的大多数人可能都知道卵石手表,这款手表会收到您手机的推送通知。

他们能够接收一些通知。

  • 来电显示
  • 电子邮件(Gmail 或任何 IMAP 电子邮件帐户)
  • Android 和 iPhone 上的短信
  • iMessage(仅限 iOS)
  • 日历提醒
  • 脸书消息
  • 推特
  • 天气警报
  • 静音振动闹钟和定时器

我该怎么做?也许他们使用 facebook api 或类似的东西自己写了一些通知。但是如何用短信和电话做到这一点?

你能捕捉到哪些通知?

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 回答
274 浏览

c - 奇怪的 NOOP 约定?

我正在浏览用于构建 Pebble 表盘的模板(在 cloudpebble.net 上)并遇到了以下代码:

我指出的线路有什么用途?

0 投票
1 回答
265 浏览

python - Pebble watch font2png.py,“需要整数”错误

Pebble Github:font2png.py

我很难让这段代码运行。我正在尝试使用 font2png.py 但它不起作用。我运行命令

我不断收到这些错误:

有任何想法吗?我有正确路径中的字体和一切。如果有任何区别,我正在使用 Roboto-Condensed.ttf。

0 投票
1 回答
1963 浏览

android - 我可以读取另一个应用程序内存吗?

我想知道是否可以从 Android 中的外国应用程序中读取一些数据(例如读取 runtastics 脉冲、距离、步速等)并将其包含到我自己的应用程序中?

我问这个问题不是因为我想用它做一些坏事,我只是想知道一些有趣的 Pebble 开发任务。

0 投票
1 回答
1839 浏览

java - 向 Pebble 发送通知

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

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

编辑:显而易见的问题:

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

c - 在运行时更改静态变量

这是一个具体的问题,但我还是发布了它......

我无法在运行时更改静态变量。我的问题是我无法在运行时更改列表视图中的行数。它适用于下面的代码,但这个列表现在是静态的。如果用户想要添加或删除一项,此示例中的列表仍然有 5 行。

这些是与节中的项目有关的脚本行:

[..]

[..]

API Reference 中 SimpleMenuSection 的定义:

0 投票
1 回答
900 浏览

ios - 当应用程序处于后台模式时,Pebble Watch 将数据推送到 iOS

我一直在到处寻找并努力寻找一个明确的答案。我想知道在后台模式下或手机锁定时,卵石手表应用程序是否可以与 iPhone 通信以发送事件。

我使用它的一个例子(以最基本的形式)是在你的手机和手表上运行的秒表。用户可以从卵石手表启动、停止等,iPhone 会将用户事件发送到服务器......

任何帮助将非常感激。

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?