Sorry, no. If I had known it, I would have written it. I imagine you could find the answer by using the search engine, seems like something that has been discussed several times before.
Depends on: Phone, JavaObject and ContentResolver libraries Sub AddBitmapToGallery (In As InputStream, TargetName As String, MimeType As String) Dim p As Phone Dim ctxt As JavaObject ctxt.InitializeContext If p.SdkVersion >= 29 Then Dim cr As ContentResolver...
I've made the same test. It works, but andredamen wants the picture appears under the "Screenshots" album, and not into the "Pictures" one (In my image, Capturas means Screenshots)
I read this thread, and it solved my SDK 29 issue with images not going to the gallery https://www.b4x.com/android/forum/threads/add-image-to-gallery-android-5-10.121992/#content Thank you! These images go to the generic "Pictures" album. Previously, when I was using intents with...
Doesn't work with me. I work with sdk version 30. On my tablet in the folder " Images" there is no folder names "Pictures" I have changes the line in the AddPhototoGallery app to:
B4X:
cr.Delete(EXTERNAL_CONTENT_URI, "_display_name = ?", Array As String("%/Screenshots/%"& TargetName))
The app makes a folder "Pictures" in the folder "Images"en puts the image in that folder.
The EXTERNAL_CONTENT_URI = "(HierarchicalUri) content://media/external/images/media . I think that I can't change that and that this is the problem.
Still I can not put a screenshot made with my app in the folder "screenshots". It is strange José that it works with you. Did I do something wrong?
No, I think you didn't, I think is just our phone manufactures, uses differents folders names for saving the pictures.
Save a screenshot to see where your phone saves it. Maybe the name is different.
Sorry, I don't know a general way of making it works for any phone