Created
October 27, 2013 23:02
-
-
Save tolland/7188954 to your computer and use it in GitHub Desktop.
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
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