//Called when application is started. function OnStart() { app.LoadScript("DlgNewFile.js") lay = app.CreateLayout( "Linear", "VCenter,FillXY" ); btn = app.CreateButton( "Create a new File", 0.3, 0.1, "Alum" ); btn.SetOnTouch(CreateNewFile); lay.AddChild( btn ); app.AddLayout( lay ); } //Create a new Dialog function CreateNewFile() { // write the path where you want create the file DlgNewFile = new NewFileDialog("/mnt/sdcard/"); DlgNewFile.Show(); }