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
2
votes
0 answers

How to create/delete files in secondary storage SDCARD version after KitKat?

Knows that the permission of creating and deleting changes to SAF(storage access framework) in secondary storage SDCARD OS version after KitKat. Under manifests, permission has been set,
2
votes
1 answer

Write file on Android with Onedrive and StorageAccessFramework

I use Storage Access Framework (SAF) on Android with OneDrive. Reading a file works fine, but when i try to save file, it doesn't work (i get a "Bad File Number" issue) Using SAF with GoogleDrive in the same way works perfectly. Is this because…
martial
  • 136
  • 2
  • 8
1
vote
1 answer

Why is DocumentsContract.getTreeDocumentId(uri) giving me the doc ID for a parent of the Uri argument?

The app sends the user to SAF picker with ACTION_OPEN_DOCUMENT_TREE: void openStoragePicker() { String messageTitle = "Choose directory app to use"; Intent intent = new Intent(ACTION_OPEN_DOCUMENT_TREE); …
Pizza and Coke
  • 103
  • 1
  • 8
1
vote
1 answer

onActivityResult not being called when Preference Fragment calls it as a parent

My app records GNSS positions as a tool to produce Orienteering's map using a cell phone. The main activity does all the job and when the mapper needs to export the field job done, app calls a child activity (Save_File) responsible to save on…
1
vote
3 answers

How to extract zip archive with subdirectories using SAF / DocumentFile?

I'm struggling with extracting a zip file contents using the evil Storage Access Framework, as you may know; I can't use any File objects so I have to use ZipInputStream, ZipOutputStream and DocumentFile, Here's the zip file structure: Folder 1/ABC…
Al_HK
  • 65
  • 1
  • 9
1
vote
1 answer

Android 10 scoped storage how to delete the underlying image file in a shared directory

I'm using scoped storage and MediaStore content provider like the in the documents. The problem is that the underlying files are not being deleted. (I have yet to see a question specifically on this topic, but many comments are showing this is not…
funct7
  • 3,407
  • 2
  • 27
  • 33
1
vote
1 answer

DocumentFile.createFile() failed on some Android 10 devices

DocumentFile.createFile() returns null ( java.lang.IllegalArgumentException ) on some Android 10 devices. Most of them are HUAWEI devices: VOG-L29, MAR-LX1A, ... Some users have reported this, but I can't figure out why. I don't have a device with…
Blue Ocean
  • 208
  • 2
  • 8
1
vote
2 answers

Does Anyone knows Where this permission come from and how to grant this programmatically in Android?

I want to create a file explorer , after a lot searching , I found out that I can't Modify , delete or create files on SD card without SAF(Storage Access Framework) on API 25 and higher.Then I installed Some File Manager for Testing how do They…
1
vote
2 answers

Swing Application Framework session store

I have been using the Swing Application Framework, and very pleased with its sessions state storage. I was wondering if it's possible to delete (clean up) the persisted states. of All dialog forms. or of specific dialog forms. If not, has anyone…
Marc
  • 351
  • 4
  • 13
1
vote
1 answer

How can I implement of updating file on the server (file cloud) using SAF?

My mobile cloud application gets all content from the remote server, and it should use Storage Access Framework http://developer.android.com/guide/topics/providers/document-provider.html and implement DocumentsProvider…
Konstantin
  • 153
  • 8
1
vote
1 answer

BSAF stalls opening a DB connection

Running a Java application using Better Swing Application Framework (BSAF), if I ever try to open a connection with a database once the program has launched it gets stalled. If I happen to run the connection before the launch, it works properly. In…
0
votes
1 answer

Logging with java.util.logging in a multi thread application

I have a swing application based on SAF (Swing Application Framework). All logging is done via java.util.logging and two different handlers: console and file. When I create Action to be executed by background taks, these task do not logging does not…
eppesuig
  • 1,375
  • 2
  • 12
  • 28
0
votes
0 answers

Android get folder of single DocumentFile (uriForFile)

I have big trouble to get the directory that contains a users picked file. The file contains the information for the directory. So I have to read it and then work with tbe files in that directory. The question is how I get from the DocumentFile…
Oschi
  • 1
0
votes
0 answers

android 10 how to write a file that the user can access

@CommonsWare Update #4: Finally got to run ContentEditor. Main holdup was getting correct Java version specified. Update #3: Reading your book from the start. Perhaps now I will get somewhere. I'll come back to this later. Update #2: BTW, I have…
Mick
  • 663
  • 1
  • 9
  • 18
0
votes
0 answers

Granular permissions for Documents or Pdf Android 13 API 33

I know there are others similar thread, but I believe that a case was not evaluated: When you create a file and then unistall and reinstall the app. My app saves pdf in the shared 'Documents' folder, getting the path through…
akLab
  • 13
  • 4