Executes a shell command on the android shell.
Example - ListDir SH
function OnStart()
{
var delim = "\0";
var list = app.SysExec( 'ls -ap /sdcard/;exit', "sh,log" );
list = list.split( "\n" ).join( delim );
lay = app.CreateLayout( "linear", "VCenter,FillXY" );
lst = app.CreateList( list, 1, 1, "", delim );
lay.AddChild( lst );
app.AddLayout( lay );
}
from native import app
def OnStart():
delim = "\0"
list = app.SysExec('ls -ap /sdcard/;exit', "sh,log")
list = list.split("\n").join(delim)
lay = app.CreateLayout("linear", "VCenter,FillXY")
lst = app.CreateList(list, 1, 1, "", delim)
lay.AddChild(lst)
app.AddLayout(lay)