Last active
February 8, 2017 22:25
-
-
Save fayeli/e0f74efaf615558e57758dc507155361 to your computer and use it in GitHub Desktop.
tabletAppTutorialStep1
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
(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