HI,
In the app docs for ChooseFile the callback is documented as
function(path,name)
name seems to return as undefined
(path returned is path and name)
Android 13, DS 2.61
Regards, ah
function OnStart() {
lay = app.CreateLayout( "linear", "VCenter,FillXY" );
var txt = app.AddText( lay,"Import a file into this project")
var list = "*/*,application/text,application/apk,application/zip," +
"audio/mpeg,audio/mp4,audio/ogg,image/png,image/jpeg,text/css," +
"text/html,text/javascript,text/plain,video/mpeg,video/mp4,video/ogg";
spnMime = app.AddSpinner(lay,list);
btnChoose = app.AddButton(lay, "Choose File", 0.5, 0.1 );
btnChoose.SetOnTouch( btnChoose_OnTouch );
app.AddLayout( lay );
}
function btnChoose_OnTouch() {
app.ChooseFile( "Choose a File", spnMime.GetText(), OnChoose );
}
function OnChoose( path,name ) {
alert( "file path: " + path );
alert( "file name: " + name );
}
//