Skip to content

Instantly share code, notes, and snippets.

@tolland
Created October 27, 2013 23:02
Show Gist options
  • Save tolland/7188954 to your computer and use it in GitHub Desktop.
Save tolland/7188954 to your computer and use it in GitHub Desktop.
from android import Android
droid = Android()
def launch_script(path, terminal=False):
terminal = 'FORE' if terminal else 'BACK'
activity = 'com.googlecode.android_scripting.action.LAUNCH_{0}GROUND_SCRIPT'.format(terminal)
extras = {'com.googlecode.android_scripting.extra.SCRIPT_PATH': path}
packagename = 'com.googlecode.android_scripting'
classname = 'com.googlecode.android_scripting.activity.ScriptingLayerServiceLauncher'
intent = droid.makeIntent(activity, None, None, extras, None, packagename, classname).result
droid.startActivityIntent(intent)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment