I thought the correct way to get images from the device is to query the media store.
For some reason I cannot get it to work!
Also, I am aware there is the Mediabrowser library, but it is not working with some devices, so trying to track down the issue, I came to querying the media store myself.
For some reason I cannot get it to work!
B4X:
Sub Activity_Create(FirstTime As Boolean)
CR.Initialize("cr")
Dim image_uri As Uri
image_uri.Parse("content://media/external/images/media")
Dim projection() As String = Array As String("datetaken")
CR.QueryAsync(image_uri, projection, Null, Null,Null)
End Sub
Sub CR_QueryCompleted (Success As Boolean, Crsr As Cursor)
Log("Success")
Log(Crsr.RowCount & " Rows")
For i = 0 To Crsr.RowCount-1
Dim s As StringBuilder
s.Initialize
For j = 0 To Crsr.ColumnCount-1
s.Append(Crsr.GetString2(j) & " ")
Next
Log(s)
Next
End Sub
Also, I am aware there is the Mediabrowser library, but it is not working with some devices, so trying to track down the issue, I came to querying the media store myself.