@@ -40,7 +40,7 @@ quality of the implementation of each one, and avoid common bugs.
4040
4141## Waiting for PebbleKit JS
4242
43- Any app that wishes to send data from the watch to the phone via
43+ Any app that wishes to send data from the watch to the phone via
4444{% guide_link communication/using-pebblekit-js "PebbleKit JS" %} ** must**
4545wait until the JavaScript ` ready ` event has occured, indicating that the phone
4646has loaded the JavaScript component of the launching app. If this JavaScript
@@ -68,7 +68,7 @@ static bool s_js_ready;
6868```
6969
7070This can be exported in a header file for other parts of the app to check. Any
71- parts of the app that are waiting should call this as part of a
71+ parts of the app that are waiting should call this as part of a
7272[ retry] ( #timeouts-and-retries ) mechanism.
7373
7474``` c
@@ -122,7 +122,7 @@ Under such a scheme:
122122The interval chosen before a timeout occurs and the message is resent may vary
123123depending on the circumstances. The first failure should be reattempted fairly
124124quickly (one second), with the interval increasing as successive failures
125- occurs. If the connection is not available the timer interval should be
125+ occurs. If the connection is not available the timer interval should be
126126[even longer](https://en.wikipedia.org/wiki/Exponential_backoff), or wait until
127127the connection is restored.
128128
@@ -186,7 +186,7 @@ message reattempted after an additional delay (the 'retry interval') to avoid
186186saturating the channel:
187187
188188```c
189- static void outbox_failed_handler(DictionaryIterator *iter,
189+ static void outbox_failed_handler(DictionaryIterator *iter,
190190 AppMessageResult reason, void *context) {
191191 // Message failed before timer elapsed, reschedule for later
192192 if(s_timout_timer) {
@@ -195,7 +195,7 @@ static void outbox_failed_handler(DictionaryIterator *iter,
195195
196196 // Inform the user of the failure
197197 text_layer_set_text(s_status_layer, "Failed. Retrying...");
198-
198+
199199 // Use the timeout handler to perform the same action - resend the message
200200 const int retry_interval_ms = 500;
201201 app_timer_register(retry_interval_ms, timout_timer_handler, NULL);
@@ -220,7 +220,7 @@ successive messages.
220220Because there is no guarantee of how long a message will take to transmit,
221221simply using timers to schedule multiple messages after one another is not
222222reliable. A much better method is to make good use of the callbacks provided by
223- the `` AppMessage `` API.
223+ the `` AppMessage `` API.
224224
225225
226226### Sending a List to the Phone
@@ -380,7 +380,7 @@ can be applied exactly to either and Android or iOS companion app wishing to
380380transmit many data items to Pebble.
381381
382382
383- Get the complete source code for this example from the
383+ Get the complete source code for this example from the
384384[`list-items-example`](https://github.com/pebble-examples/list-items-example)
385385repository on GitHub.
386386
@@ -421,7 +421,7 @@ of how to display a compressed PNG image will be discussed here. The image that
421421will be displayed is
422422[the HTML 5 logo](https://www.w3.org/html/logo/):
423423
424- 
424+ 
425425
426426> Note: The above image has been resized and palettized for compatibility.
427427
@@ -431,7 +431,7 @@ data in the correct format:
431431
432432```js
433433function downloadImage() {
434- var url = 'http ://developer.getpebble.com.s3.amazonaws.com /assets/other /html5-logo-small.png';
434+ var url = 'https ://developer.rebble.io /assets/images/guides/pebble-apps/communications /html5-logo-small.png';
435435
436436 var request = new XMLHttpRequest();
437437 request.onload = function() {
@@ -446,8 +446,8 @@ function downloadImage() {
446446When the response has been received, ` processImage() ` will be called. The
447447received data must be converted into an array of unsigned bytes, which is
448448achieved through the use of a ` Uint8Array ` . This process is shown below (see
449- the
450- [ ` png-download-example ` ] ( https://github.com/pebble-examples/png-download-example )
449+ the
450+ [ ` png-download-example ` ] ( https://github.com/pebble-examples/png-download-example )
451451repository for the full example):
452452
453453``` js
@@ -485,7 +485,7 @@ allocate to store the compressed image data:
485485function transmitImage (array ) {
486486 var index = 0 ;
487487 var arrayLength = array .length ;
488-
488+
489489 // Transmit the length for array allocation
490490 Pebble .sendAppMessage ({' DataLength' : arrayLength}, function (e ) {
491491 // Success, begin sending chunks
@@ -627,6 +627,6 @@ if(complete_t) {
627627The final result is a compressed PNG image downloaded from the web displayed in
628628a Pebble watchapp.
629629
630- Get the complete source code for this example from the
631- [ ` png-download-example ` ] ( https://github.com/pebble-examples/png-download-example )
630+ Get the complete source code for this example from the
631+ [ ` png-download-example ` ] ( https://github.com/pebble-examples/png-download-example )
632632repository on GitHub.
0 commit comments