Last active
August 29, 2015 14:10
-
-
Save carlsmith/1970be371bae451e868b to your computer and use it in GitHub Desktop.
Launch one SL4A script from inside another one.
This file contains hidden or 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, 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' | |
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