Skip to content

Commit

Permalink
Download package apk inside PREFIX
Browse files Browse the repository at this point in the history
  • Loading branch information
fornwall authored and Leonid Pliushch committed Aug 13, 2020
1 parent e7fb02e commit a5cef4e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/src/main/java/com/termux/app/ApkInstaller.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Environment;
import android.util.Log;

import com.termux.terminal.EmulatorDebug;
Expand All @@ -22,7 +21,7 @@ public void run() {
try {
String urlString = "https://termux.net/apks/" + packageName + ".apk";
Log.e(EmulatorDebug.LOG_TAG, "Installing " + packageName + ", url is " + urlString);
File downloadFile = new File(Environment.getExternalStorageDirectory(), "tmp.apk");
File downloadFile = new File(TermuxService.FILES_PATH, "tmp.apk");
URL url = new URL(urlString);
try (FileOutputStream out = new FileOutputStream(downloadFile)) {
try (InputStream in = url.openStream()) {
Expand Down

0 comments on commit a5cef4e

Please sign in to comment.