Skip to content

Instantly share code, notes, and snippets.

View carlsmith's full-sized avatar

Carl Smith carlsmith

  • Cambridgeshire, UK
View GitHub Profile
@carlsmith
carlsmith / launcher.py
Last active August 29, 2015 14:10
Launch one SL4A script from inside another one.
from android import Android
droid = Android()
def launch_script(path, visible=False):
visibilty = 'FORE' if visible else 'BACK'
activity = 'com.googlecode.android_scripting.action.LAUNCH_{0}GROUND_SCRIPT'.format(visibilty)
extras = {'com.googlecode.android_scripting.extra.SCRIPT_PATH': path}
package = 'com.googlecode.android_scripting'
classname = 'com.googlecode.android_scripting.activity.ScriptingLayerServiceLauncher'