Skip to content

Instantly share code, notes, and snippets.

@junjihashimoto
Created July 13, 2015 21:14
Show Gist options
  • Save junjihashimoto/e94a6c74f3af8d899762 to your computer and use it in GitHub Desktop.
Save junjihashimoto/e94a6c74f3af8d899762 to your computer and use it in GitHub Desktop.
class MyClass(GeneratedClass):
def __init__(self):
GeneratedClass.__init__(self)
def onLoad(self):
pass
def onUnload(self):
pass
def _getTabletService(self):
tabletService = None
try:
tabletService = self.session().service("ALTabletService")
except Exception as e:
self.logger.error(e)
return tabletService
def onInput_onStart(self):
# We create TabletService here in order to avoid
# problems with connections and disconnections of the tablet during the life of the application
tabletService = self._getTabletService()
if tabletService:
tabletService.showWebview()
else:
self.logger.warning("ALTabletService not found.")
self.onStopped()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment