android-storage Questions

2

Solved

I'm trying to walk an Android DocumentFile tree recursively but I cannot get a list of files to be returned for a subfolder. When I attempt listFiles() on the folder URI, I get the list of root fil...
Discomfort asked 28/8, 2021 at 3:12

38

Solved

I am getting open failed: EACCES (Permission denied) on the line OutputStream myOutput = new FileOutputStream(outFileName); I checked the root, and I tried android.permission.WRITE_EXTERNAL_S...

16

Solved

My App use the file paths of images provided by Environment.getExternalStorageDirectory() to create albums of photos, but with Android 11 I won't be able to access directly files. According to the ...
Hauge asked 7/7, 2020 at 19:35

5

Solved

How to delete folder(contain some folder and file) from internal storage? Folder have some below tree. folder |_________ C2 (folder) |________1 (folder) |________1.gif |________2.gif |________...
Incrustation asked 16/11, 2012 at 5:22

4

Solved

Read that Android 11 has scoped storage, but I can't find any information, how can I create and use folder in /storage/emulated/0/ ? Old methods works only on api 29 and below :(
Dareen asked 22/9, 2020 at 19:42

2

Solved

This Code Works Fine With Media Files I want a solution For Document Files I Don't Know how to put contentValues For Document Files fun getFile(fileName: String): File? { with(sharePrefHelper.app)...
Zoophilous asked 17/5, 2022 at 6:54

1

All new apps uploaded to Google Play must target Android 10 (API level 29) or higher. However, when app targets API level 29, the path returned from Environment.getExternalStorageDirectory() is no ...
Mcroberts asked 17/10, 2020 at 21:37

4

I have an app which records videos to shared MOVIES folder. I can delete those files on Android 11 (API 30) with contentResolver.delete(uri, null, null) method in my recorded videos activity. But i...
Miltonmilty asked 28/10, 2020 at 22:33

3

Solved

UPDATE I have a Samsung Galaxy S8+ running 8.0.0 T-Mobile that it works fine on running 8.0.0 My Samsung Galaxy S9+ running 8.0.0 Verizon, it fails everytime with illegal argumen...
Cock asked 11/10, 2018 at 0:31

3

Solved

I used to use following code to save a raw sound file to external storage and set it as ringtone. But things seems to change in android 10. Can you help me or show me some guideline how to update m...
Sudd asked 6/10, 2019 at 8:30

0

For public media folders instead of Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM) we can use: values.put(MediaStore.Media.RELATIVE_PATH, Environment.DIRECTORY_DCIM) uri...

2

Solved

I want to download some audio files from the internet. I want to use downloadmanager to download this file but I don't know how to save these files to a specific internal storage location in androi...

2

My activity needs to request a new document from a document provider. I want to test this in my espresso test by intenting an activity result with a uri. However, the returned uri does not have th...
Wardell asked 4/3, 2018 at 22:18

1

Suppose a Uri can be either of the following: A Uri from a Storage Access Framework's DocumentFile (i.e. DocumentFile.getUri()). A Uri from a regular File (i.e. Uri.fromFile(File)) It refers to...
Compress asked 21/2, 2018 at 20:54

2

Solved

So I've been sitting here for 4 hours now, scratching my head as to why are my 2 devices misbehaving. The problem is, checkSelfPermission is returning false, even if the permission is granted! I'm ...
Browning asked 13/11, 2019 at 20:9

1

I am using PDF.js to show PDF files inside my Android App. Up to Android 10 it worked fine, but starting with "targetSdkVersion 30" it doesn't work anymore. If I want to open and show a P...
Flattish asked 6/10, 2020 at 9:35

6

Solved

I am new android, i'm making an app in which one can download files to downloads folder (using Download Manager). I can see pictures if i go to downloads folder in emulator. So if i want to show a ...
Retractor asked 26/10, 2011 at 20:2

1

Solved

I want to list all files .txt in the Download folder and then allow the user to pick one and read its content. My minSdkVersion is 16, but I came across this problem because my Android is Q (29). ...
Extensile asked 26/2, 2020 at 14:13

1

Solved

I have an application where when I press on a button it should open the folder picker and allow the user to browse and select a folder ONLY. Then I want to get the folder's path so that I can do so...
Heterozygote asked 14/7, 2019 at 11:42

1

I am currently using this code to store images (it might be wrong). The path is this: public static final String IMAGE_DIR = "test"; The code for saving the image is as follow: public class I...
Cassatt asked 11/7, 2018 at 3:2

1

I'm trying to get the size occupied by my application package. Every application has one location in the internal/external storage. I want to calculate the size of the following directory, how can...

2

Solved

I'm implementing an import feature for my Android app. I wanted to let the user select files which they want to import from the external storage on their device (the downloads directory to be exact...
1

© 2022 - 2025 — McMap. All rights reserved.