76 1.0.8.6 apk down 路径qipao/apk/xxx

This commit is contained in:
2025-12-15 14:48:02 +08:00
parent c2096a8274
commit 0c8163277a

View File

@@ -67,7 +67,7 @@ public class DownloadUtil {
this.mContext = context;
final String dUrl = downUrl;
File qipaoDir = new File(mContext.getFilesDir(), "qipao");
File qipaoDir = new File(mContext.getFilesDir(), PATH_APK);
if (qipaoDir.exists() && qipaoDir.isDirectory()) {
Observable.create(new ObservableOnSubscribe<Boolean>() {
@Override
@@ -85,14 +85,12 @@ public class DownloadUtil {
String downUrlEnd = "";
if (i != -1) {
downUrlEnd = dUrl.substring(i);
if (downUrlEnd.contains("/")) {
downUrlEnd = downUrlEnd.replace("/", "");
}
}
mApkPath = new File(mContext.getFilesDir(), PATH_APK + downUrlEnd).getAbsolutePath();
}
});
} else {
LogUtils.e("else ."+(mApi == null));
if (mApi == null) {
//初始化网络请求接口
mApi = ApiHelper.getInstance().createService(ApiInterface.class);
@@ -100,11 +98,9 @@ public class DownloadUtil {
if (i != -1) {
downUrl = downUrl.substring(i);
}
mApkPath = new File(mContext.getFilesDir(), PATH_APK + downUrl.replace("/", "")).getAbsolutePath();
mApkPath = new File(mContext.getFilesDir(), PATH_APK + downUrl).getAbsolutePath();
}
}
}
public void downloadVoiceFile(String url, final DownloadListener downloadListener) {