Created
June 19, 2018 15:00
-
-
Save stefanoverna/2a7f842b8e885a55203c6fd5861197c6 to your computer and use it in GitHub Desktop.
Simply.js Pebble
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('Ciao!'); | |
simply.on('singleClick', function(e) { | |
console.log(util2.format('single clicked $button!', e)); | |
simply.subtitle('Pressed ' + e.button + '!'); | |
}); | |
simply.on('longClick', function(e) { | |
console.log(util2.format('long clicked $button!', e)); | |
simply.vibe(); | |
simply.scrollable(e.button !== 'select'); | |
}); | |
simply.on('accelTap', function(e) { | |
console.log(util2.format('tapped accel axis $axis $direction!', e)); | |
simply.subtitle('Tapped ' + (e.direction > 0 ? '+' : '-') + e.axis + '!'); | |
}); | |
simply.setText({ | |
title: 'Simply Demo!', | |
body: 'This is a demo. Press buttons or tap the watch!', | |
}, true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment