Test the PhoneGap plug-in for the Android Hybrid Web Container.
This is the key name you will use in the custom.js file for the customAfterMenuItemClick () function.
var dirlist = { getlist: function(successCallback, errorCallback) { PhoneGap.exec(successCallback, errorCallback, 'DirectoryListPlugin', 'list',["/mnt/sdcard"]); } }; function getDlist() { dirlist.getlist(function(r) { var theHtml = ""; if(r.children) { var index = 0; for(index = 0; index <= r.children.length;index++) { if(r.children[index]){ theHtml += r.children[index].filename + " \n "; } } } else { alert("No r.children!!"); } alert(theHtml); }, function(error) { alert('Error:' + error); }); }
if(menuItem == "c"){ getDlist(); }