So, I have been banging my head against the keyboard all weekend on this one...(BTW, not helping...)
I have the following, but can't get it to run the iInitial Command (or script)...what am I missing?
when Button1.LongClick
do
set ActivityStarter1.Action to "android.intent.action.MAIN"
set ActivityStarter1.ExtraKey to "jackpal.androidterm.iInitialCommand"
set ActivityStarter1.ExtraValue to "exec su -c whoami"
set ActivityStarter1.ActivityPackage to "jackpal.androidterm"
set ActivityStarter1.ActivityClass to "jackpal.androidterm.Term"
call ActivityStarter1.StartActivity
I have also tried the following:
when Button1.LongClick
do
set ActivityStarter1.Action to "android.intent.action.MAIN"
set ActivityStarter1.ExtraKey to "android.intent.action.RUN_SCRIPT"
set ActivityStarter1.ExtraValue to "exec sh run.sh"
set ActivityStarter1.ActivityPackage to "jackpal.androidterm"
set ActivityStarter1.ActivityClass to "jackpal.androidterm.Term"
call ActivityStarter1.StartActivity
Thanks much for your time and assistance,
Rick
Trying to push the limits of App Inventor!
Snippets and
Tutorials from
Pura Vida Apps by
Taifun.
// opens a new window
Intent i = new Intent("jackpal.androidterm.OPEN_NEW_WINDOW");
i.addCategory(Intent.CATEGORY_DEFAULT);
startActivity(i);
// opens a new window and runs "echo 'Hi there!'"
// application must declare jackpal.androidterm.permission.RUN_SCRIPT in manifest
Intent i = new Intent("jackpal.androidterm.RUN_SCRIPT");
i.addCategory(Intent.CATEGORY_DEFAULT);
i.putExtra("jackpal.androidterm.iInitialCommand", "echo 'Hi there!'");
startActivity(i);