Back

GetAccounts

JS Py
Hello World

Returns a string of all known account names on the device separated with comma ','.

app.GetAccounts() → String: comma “,” separated

See Also: ChooseAccount

Example - Get Accounts

function OnStart()
{
    var accounts = app.GetAccounts();
    dlg = app.CreateListDialog( "Select an account:", accounts );
    dlg.SetOnTouch( dlg_OnTouch );
    dlg.Show();
}

function dlg_OnTouch( account )
{
    app.ShowPopup( "Selected Account: " + account );
}
from native import app

def OnStart():
    accounts = app.GetAccounts()
    dlg = app.CreateListDialog( "Select an account:", accounts )
    dlg.SetOnTouch( dlg_OnTouch )
    dlg.Show()

def dlg_OnTouch( account, checked):
    app.ShowPopup( "Selected Account: " + account )
    Copy     Copy All       Run