Commit f572ff3a by wjg

add install app

parent e6d3d116
......@@ -106,9 +106,16 @@ public class UpdateService extends Thread {
private void startDownload(UpdateDataVo dataVo) {
String filename = "hooloo-device_" + dataVo.getVersion() + "_" + dataVo.getVersionCode() + "_" + System.currentTimeMillis() + ".apk";
String path = Environment.getExternalStorageDirectory().getAbsolutePath() + "/hooloo";
if (!new File(path).exists()) {
new File(path).mkdirs();
File pathFile = new File(path);
if (!pathFile.exists()) {
pathFile.mkdirs();
}
if (pathFile.listFiles() != null) {
for (File subfile : pathFile.listFiles()) {
subfile.delete();
}
}
String file = path + "/" + filename;
Utils.i(AppConfig.TAG_UPDATE, String.format("开始下载文件 url: %s, file: %s", dataVo.getUrl(), file));
if (AppConfig.DEBUG) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment