anOparator Active Member Licensed User Longtime User Nov 21, 2015 #1 Is there now a way to open a file from the default Gallery, which is on SD card, across many devices? My SD card has Internal and SD folders but the following code lists an array from the Internal folder. Code: Copy Sub Button1_Click List1 = File.ListFiles(File.DirRootExternal) Log(List1) End Sub Am trying to access the Gallery and show any image without making a List or Map. Thanks Last edited: Nov 21, 2015
Is there now a way to open a file from the default Gallery, which is on SD card, across many devices? My SD card has Internal and SD folders but the following code lists an array from the Internal folder. Code: Copy Sub Button1_Click List1 = File.ListFiles(File.DirRootExternal) Log(List1) End Sub Am trying to access the Gallery and show any image without making a List or Map. Thanks
ivanomonti Expert Licensed User Longtime User Nov 22, 2015 #2 https://www.b4x.com/android/forum/threads/contentchooser-crash.60625/ Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Nov 22, 2015 #3 You should use ContentChooser. Upvote 0
anOparator Active Member Licensed User Longtime User Nov 23, 2015 #4 Erel said: You should use ContentChooser. Click to expand... ContentChooser relies on Code: Copy cc.Show("image/*", "Choose image") which enables choosing one of the images. My objective is to show each file sequentially: realPath = /storage/sdcard1/Pictures/1.jpg realPath = /storage/sdcard1/Pictures/2.jpg realPath = /storage/sdcard1/Pictures/3.jpg via a Timer or Button, without first showing folder contents. Once I comprehend the path statement I'm OK. Is this possible? thanks Upvote 0
Erel said: You should use ContentChooser. Click to expand... ContentChooser relies on Code: Copy cc.Show("image/*", "Choose image") which enables choosing one of the images. My objective is to show each file sequentially: realPath = /storage/sdcard1/Pictures/1.jpg realPath = /storage/sdcard1/Pictures/2.jpg realPath = /storage/sdcard1/Pictures/3.jpg via a Timer or Button, without first showing folder contents. Once I comprehend the path statement I'm OK. Is this possible? thanks
Erel B4X founder Staff member Licensed User Longtime User Nov 23, 2015 #5 ContentChooser lets the user chooses an image from the gallery. The default folder for pictures is: Code: Copy Dim picturesFolder As String = File.Combine(File.DirRootExternal, "Pictures")) You can use File.ListFiles to find the files in that folder. Note that pictures may also be saved in other locations. Upvote 0
ContentChooser lets the user chooses an image from the gallery. The default folder for pictures is: Code: Copy Dim picturesFolder As String = File.Combine(File.DirRootExternal, "Pictures")) You can use File.ListFiles to find the files in that folder. Note that pictures may also be saved in other locations.
anOparator Active Member Licensed User Longtime User Nov 24, 2015 #6 Since contentChooser seems to demand User Interaction my question should have been 'How to make slideshow using the Gallery'. Oops on my part. All links and pointers appreciated. Upvote 0
Since contentChooser seems to demand User Interaction my question should have been 'How to make slideshow using the Gallery'. Oops on my part. All links and pointers appreciated.
anOparator Active Member Licensed User Longtime User Nov 25, 2015 #7 I got it Code: Copy Sub btn1_Click Dim i as Intent i.Initialize(i.ACTION_VIEW, "file:///storage/sdcard1/Pictures/1.jpg") i.SetType(" image/*") StartActivivity(i) End Next test is a Map of the folder to step thru. powered by B4A Upvote 0
I got it Code: Copy Sub btn1_Click Dim i as Intent i.Initialize(i.ACTION_VIEW, "file:///storage/sdcard1/Pictures/1.jpg") i.SetType(" image/*") StartActivivity(i) End Next test is a Map of the folder to step thru. powered by B4A