|
|
@@ -164,6 +164,36 @@ namespace Dongke.IBOSS.PRD.Service.PDAModuleLogic
|
|
|
}
|
|
|
return pdaResult;
|
|
|
}
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 获取Apk信息
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ public static ServiceResultEntity GetApkInfo()
|
|
|
+ {
|
|
|
+ ServiceResultEntity sre = new ServiceResultEntity();
|
|
|
+ Dictionary<string, object> appInfo = new Dictionary<string, object>();
|
|
|
+ string ApkPath = INIUtility.Instance(INIUtility.IniFile.Config).ReadIniData("PathSetting", "UpgradeAPKPath");
|
|
|
+ ApkPath = System.AppDomain.CurrentDomain.BaseDirectory + ApkPath;
|
|
|
+
|
|
|
+ appInfo.Add("AppVersion", INIUtility.Instance(INIUtility.IniFile.Config).ReadIniData("VersionSetting", "AndroidVersion"));
|
|
|
+ appInfo.Add("ApkPath", ApkPath);
|
|
|
+ if (File.Exists(ApkPath))
|
|
|
+ {
|
|
|
+ //pdaResult.Rights = userEntity.UserRightData;
|
|
|
+ FileStream file = File.OpenRead(ApkPath);
|
|
|
+ appInfo.Add("ApkSize", file.Length);
|
|
|
+ file.Close();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ appInfo.Add("ApkSize", -1);//APK文件不存在
|
|
|
+ sre.Message = "APK文件不存在";
|
|
|
+ }
|
|
|
+ sre.Result = appInfo;
|
|
|
+
|
|
|
+ return sre;
|
|
|
+ }
|
|
|
#endregion
|
|
|
|
|
|
#region 获得显示数据
|