GetActivities returns a list of object of currently running activities.
Example - Show Activities
function OnStart()
{
app.ShowProgress();
var lay = app.CreateLayout( "linear" );
var list = app.GetActivities();
lst = app.CreateList( "", 1, 1 );
lay.AddChild( lst )
app.AddLayout(lay);
for(var i in list) {
var a = list[i];
lst.AddItem(a.label, a.packageName);
}
app.HideProgress();
}
from native import app
def OnStart():
app.ShowProgress()
lay = app.CreateLayout( "linear" )
list = app.GetActivities()
lst = app.CreateList( "", 1, 1 )
lay.AddChild( lst )
app.AddLayout(lay)
for i in range(len(list)):
a = list[i]
lst.AddItem(a.label, a.packageName)
app.HideProgress()