Questions tagged [saf]

The Swing Application Framework (JSR 296) is a Java specification for providing a simple application framework for Swing applications. It defines infrastructure common to most desktop applications, making Swing applications easier to create.

50 questions
0
votes
1 answer

Is there a way to use SAF to access txt files in the same directory as images in an Android app?

I'm trying to load images in my app, in the format in trying to import, each image has a corresponding tag file. For instance cat.jpg has a corresponding cat.txt find that could contain "Cat, overweight, Felix, Home". I get a list of file URI, that…
K. Do
  • 1,256
  • 1
  • 7
  • 7
0
votes
0 answers

How can I move files to the Android/obb folder on api31 and above

I have a test program that requests access to the Android/obb folder, but I do not know how I can move files to this folder. I tried to use standard kotlin functions to manage files, but it didn't give any result. I also have a similar version…
0
votes
1 answer

How to check if parent folder of a child file's DocumentFile has permission granted/revoked?

I have asked permission for a folder (Intent.ACTION_OPEN_DOCUMENT_TREE) and created a file using folderDocumentFile.createFile() inside the folder. I have saved the fileDocumentFile's Uri for future read actions. Accessing the file using its…
passerby
  • 1,807
  • 19
  • 26
0
votes
1 answer

Recommended documents folder for storage of permanent app data portable to all Android smartphones?

We are forced to implement SAF as an update to the app is rejected by Google Play. It's a terrible user and developer experience especially if you already have an app in field for years and need to support old smartphones as well. We need to support…
tuxdost
  • 133
  • 1
  • 14
0
votes
0 answers

How do I open a child document of a granted URI using ACTION_VIEW?

Context: Simple file explorer which shows a folder contents and allow user open any file with another app depending of the mime type The expected behavior: Click in a button that launch OPEN_DOCUMENT_TREE activity User select a folder A Display all…
Alex Rintt
  • 1,618
  • 1
  • 11
  • 18
0
votes
3 answers

How to do file operations (create/write/update/delete files) using the Flutter "saf" Package

How to do file operations (create/write/update/delete files) using the Flutter "saf" Package. link:- pub.dev/packages/saf I didn't find any solutions on Google. I want to use Android "Storage Access Framework" and let users select a folder on…
AppDev
  • 3
  • 2
0
votes
0 answers

get Whatsapp Status Images and Videos in Android 11 by Using StorageManager

by using this Stack OverFlow Answer (FOR SDK 30 AND ABOVE) I well able to retrieve the number of media files present in the .Status Folder on Android 11 But When I set the path to Imageview, image view Show Blanks WAStatusModel fileItem =…
Areeba Qurashi
  • 119
  • 1
  • 8
0
votes
1 answer

I Use Storage Access Framework to browse a file link f.cfg, when you select the file, the app need to load another file like f.dat automatically, how?

In Android Studio: This app must use COMTRADE files. The COMTRADE files are *.cfg *.dat and *.rio files. For example, (user.cfg, user.dat and user.rio). The main file is *.cfg file, so the user must browse by SAF to find *.cfg files, when the user…
0
votes
1 answer

how to open file in /Android/data with other App?

After Android 11, we can't access the Android/data directory directly using File I/O. By using SAF, I can now use DocumentFile to traverse the file I want, but when I want to open the file with another app, I find I can't do it. Even if I pass in…
Junerver
  • 56
  • 5
0
votes
1 answer

SAF (Storage access network) custom options

I am using the Storage Access Framework (SAF) : Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT); intent.addCategory(Intent.CATEGORY_OPENABLE); intent.setType("image/svg+xml"); startActivityForResult(intent, 0); I am using the following…
takluiper
  • 679
  • 2
  • 8
  • 24
0
votes
0 answers

Share a file created with SAF with an intent

The problem I have on Android 11 is as follow: My app is downloading a file (image for example) form internet. The app first lets the user select the folder to store the file using Intent.ACTION_OPEN_DOCUMENT_TREE. This step gives the app SAF access…
0
votes
1 answer

Android 11 - How to access android/data/an app directory

I want to access Chrome browser directory in android/data and then copy files(TXT) From assets to that folder 1.how to get permission In Android 11 2.after getting permission How to copy any file from asset folder to that directory Please give me an…
0
votes
0 answers

Whatsapp Share Android 11 Scoped Storage

I used this code without a problem up to Android 10. But now under Android 11 it doesn't work anymore. I think Whatsapp can't read the mp3 in the app directory created from the raw resource. My skills are not that good, that I understand SAF or…
Jan Stutz
  • 1
  • 2
0
votes
0 answers

How to delete a temporary file in Download folder on Android 10

Simple to do in every system but Android, but I have and app that needs to create a csv file in SHARED EXTERNAL Download folder. Shutdown/restart phone/app and the file persist. Then I need to delete the file (persistent URI somewhere?) before I…
Mr.C
  • 31
  • 3
0
votes
1 answer

Correctly implementing openDocument for a DocumentsProvider

I am writing an example app which implements a DocumentsProvider to share files with other apps using the SAF framework. The code can be found here: DocumentsProvider example project I have a problem sharing the selected file with for example Gmail.…