30 lines
865 B
JavaScript
30 lines
865 B
JavaScript
(function () { // BEGIN LOCAL_SCOPE
|
|
var AppUi = Script.require('appUi');
|
|
|
|
function onOpened() {
|
|
console.log(“hello world!”);
|
|
}
|
|
|
|
function onClosed() {
|
|
console.log(“hello world!”);
|
|
}
|
|
|
|
var ui;
|
|
function startup() {
|
|
ui = new AppUi({
|
|
buttonName: "APP-NAME", // The name of your app
|
|
home: Script.resolvePath("app.html"), // The home screen of your app that appears when clicking the app button
|
|
graphicsDirectory: Script.resolvePath("./"), // Where your button icons are located
|
|
onOpened: onOpened // See the simple function above
|
|
onClosed: onClosed // See the simple function above
|
|
});
|
|
}
|
|
|
|
|
|
function onWebEventReceived(event) {
|
|
print("gemstoneApp.js received a web event: " + event);
|
|
}
|
|
tablet.webEventReceived.connect(onWebEventReceived);
|
|
startup();
|
|
}()); // END LOCAL_SCOPE
|
|
|