应用信息

获取应用信息
牛刀小试
应用相关信息
设备的尺寸
应用安装后的相关目录
示例代码
//应用相关信息 
//res包含三个属性,id:程序的id号、versionCode:版本编码、versionName:版本名称
app.getInfo(function(res){
	app.alert(res);
});

//设备的尺寸
//res包含两个属性,height:屏幕的高度、width:屏幕的宽度
app.getSize(function(res){
	app.alert(res);
});

//应用安装后的相关目录  
app.getAppDirectoryEntry(function(res){
    if(window.devicePlatform=="android"){
        window.savePath=res.sdcard;                       
    }else if(window.devicePlatform=="iOS"){
        window.savePath=res.documents;
    }
});