Android Code Snippet MediaBrowser - get a random image from gallery

B4X:
Dim MB As MediaBrowser
MB.Initialize("MB")
Dim tmp_m As Map = MB.GetMediaImageList(True, "datetaken DESC")
xiv.SetBitmap(LoadBitmapResize(tmp_m.Get("Location" & Rnd(0,tmp_m.Size/7)),"",xiv.Width,xiv.Height,True))
 
Top