Browse Source

版本更新23

master
fyf 1 year ago
parent
commit
efe403ae5f
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      app/src/main/java/com/example/bpa/helper/UpdateManager.java

+ 6
- 1
app/src/main/java/com/example/bpa/helper/UpdateManager.java View File

@@ -4,6 +4,7 @@ import android.app.AlertDialog;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.os.Handler;
import android.os.Message;
@@ -14,6 +15,8 @@ import android.widget.Button;
import android.widget.ProgressBar;
import android.widget.TextView;

import androidx.core.content.FileProvider;

import com.example.bpa.R;
import com.example.bpa.config.ConfigName;

@@ -299,7 +302,9 @@ public class UpdateManager {
return;
}
Intent i = new Intent(Intent.ACTION_VIEW);
i.setDataAndType(Uri.parse("file://" + apkfile.toString()), "application/vnd.android.package-archive");
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
Uri uri = Uri.parse("file://" + apkfile.toString());
i.setDataAndType(uri, "application/vnd.android.package-archive");
mContext.startActivity(i);
}
}

Loading…
Cancel
Save