Skip to content

Instantly share code, notes, and snippets.

@fayeli
Last active February 8, 2017 22:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fayeli/e0f74efaf615558e57758dc507155361 to your computer and use it in GitHub Desktop.
Save fayeli/e0f74efaf615558e57758dc507155361 to your computer and use it in GitHub Desktop.
tabletAppTutorialStep1
(function() {
// Every great app starts with a great name (keep it short so that it can fit in the tablet button)
var APP_NAME = "GEMSTONE";
// Get a reference to the tablet
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
// "Install" your cool new app to the tablet
// The following lines create a button on the tablet's menu screen
var button = tablet.addButton({
text: APP_NAME
});
// Provide a way to "uninstall" the app
// Here, we write a function called "cleanup" which gets executed when
// this script stops running. It'll remove the app button from the tablet.
function cleanup() {
tablet.removeButton(button);
}
Script.scriptEnding.connect(cleanup);
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment