Skip to content

Commit cab8b46

Browse files
authoredSep 24, 2021
fix(android): enable download functionality with Android Q (#310)
1 parent 2ce746e commit cab8b46

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/android/FileTransfer.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Licensed to the Apache Software Foundation (ASF) under one
2323
import java.io.Closeable;
2424
import java.io.File;
2525
import java.io.FileNotFoundException;
26+
import java.io.FileOutputStream;
2627
import java.io.FilterInputStream;
2728
import java.io.IOException;
2829
import java.io.InputStream;
@@ -792,7 +793,7 @@ public void run() {
792793
// write bytes to file
793794
byte[] buffer = new byte[MAX_BUFFER_SIZE];
794795
int bytesRead = 0;
795-
outputStream = resourceApi.openOutputStream(targetUri);
796+
outputStream = new FileOutputStream(file);
796797
while ((bytesRead = inputStream.read(buffer)) > 0) {
797798
outputStream.write(buffer, 0, bytesRead);
798799
// Send a progress event.

0 commit comments

Comments
 (0)
Failed to load comments.