Question

Can a Pebble app (running on the watch itself) directly access the internet (eg. fetch data from an HTTP REST API) using the paired phone only as a network gateway, without the need to write a dedicated app or software support to be run on the phone?

Was it helpful?

Solution 2

For Pebble's running version 1 software you cannot access the internet natively. But you can use the app httpebble as a "network gateway". For code examples look at Katharine's GitHub Page.

For Pebble's running version 2 software you can natively access the internet and fetch data, See the Pebble docs for more information.

As of 01/03/14, version 2 software has not been released to the public.

OTHER TIPS

As noted in a comment, as of SDK 2.0 you can use PebbleKit JavaScript Framework to run JavaScript, including the standard XMLHttpRequest object, in a sandbox provided by the official Pebble app (hence doing what httpebble did before).

Using XHR you can retrieve data from the internet and pass it on to your Pebble app using Pebble.sendAppMessage(data, ackHandler, nackHandler). Listening to an event using JavaScript you can also receive messages from the Pebble app.

See the Pebble SDK documentation here for more information: https://developer.getpebble.com/2/guides/javascript-guide.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top