B4A Library AS Gallery - show images from folders (image- and video-thumbnails) - Alexander Stolte    Aug 13, 2020   (16 reactions) I want to share my class to create a image preview list like in the gallery app.
This class is based on xCustomListView and PreoptimizedCLV.
The class is creating a cached thumbnail of a image if needed, to avoid performance issues on scrolling.
The cache folder is created here: File.MakeDir(File.Di B4A Code Snippet Add image to Gallery Android 5 - 10+ - Erel    Sep 06, 2020   (15 reactions) 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
cr.Init B4A Question Open a specific gallery folder - Erel (first post)    Jan 15, 2017   (1 reaction) Based on the comments it doesn't work on newer versions of Android. There is no public API or intent that opens a specific folder.
You can find the images yourself and show them internally. B4A Code Snippet Get the path to media files returned from ContentChooser - Erel    Jul 24, 2022   (8 reactions) It is a mistake to try to get a file path from the returned resource. It will not work in most cases, and even if you will be able to get the path, you will not be able to access it. You can use File.OpenInput to access the remote resource. Correct solution: TextEditor - Save and load external fi B4A Question What folders can be shown in Gallery? - Erel (first post)    Mar 27, 2019   (1 reaction) Pictures is a standard folder. It is safest to use this folder if you want the files to show in the gallery. B4A Question FileProvider is forcing recipient apps to become default apps - JohnC (first post)    Feb 18, 2021   (1 reaction) Just a hunch, but when that dialog does appear, do you see any other apps besides "Gallery" in that dialog?
Maybe android is setting "Gallery" as the default without displaying those buttons if gallery is the only app that can currently handle that intent on your device (so it doesn't bother to dis Share My Creation a real gallery project - source code - KZero    Jun 03, 2020   (14 reactions) Hi,
I was planning to make an image selector library like the one used in WhatsApp and Telegram but i ran out of time
so i'd like to share this project as it may be useful for someone
it is working and can be used for many proposes (tested on API-21 to API-28) , it may need a few little optimizat B4A Question ¿how to choose gallery image? - ronell (first post)    Sep 12, 2018   (1 reaction) try this
Sub btn_Click
Dim cc As ContentChooser
cc.Initialize("cc")
cc.show("image/*", "Choose image")
Wait For cc_Result(Success As Boolean, Dir As String, FileName As String)
End Sub B4A Question [SOLVED] A robust way to check Gallery content in SDK 29+ - JackKirk (first post)    Jun 07, 2021   (2 reactions) End Sub
Sub Activity_Create(FirstTime As Boolean)
CheckGallery("XYZalbum", "junk.jpg", "image/jpeg")
Wait For CheckGallery_Complete_jpeg
CheckGallery("XYZalbum", "junk.mp4", "video/mp4")
Wait For CheckGallery_Complete_mp4
End Sub
Sub CheckGallery (AlbumName As String, TargetName A B4A Question Android image gallery - deleting images - Mahares (first post)    Jun 30, 2023   (2 reactions) Here is only a suggestion because I did not have a situation where I needed to delete old photos:
Create an app with Target SDK of 28 and request EXTERNAL_Storage permission. Delete all unwanted photos from File.DirectoryExternal that way, since it is only a one time operation. Page: 1   2   3   4   5   6   7   Powered by ColBERT |