Android Question How to insert an image thumbnail into mediastore?

Inman

Well-Known Member
Licensed User
Previously I asked a question on how to delete thumbnails from mediastore and got a working solution from Erel using ContentResolver. Now I am trying to do the opposite i.e. insert an image thumbnail into mediastore.

I can see that ContentResolver has an Insert method but the parameters confuse me. The second parameter is Values As android.content.ContentValues. Not sure how to build this because I have just the directory path and filename of the image file, whose thumbnail needs to be inserted to mediastore.

Based on the java code I found here, it looks like values will include MIME_Type and DATE_TAKEN. Please help me with translating to B4A code.
 

DonManfred

Expert
Licensed User

Inman

Well-Known Member
Licensed User
Thanks Don. I guess Images.Media.MIME_TYPE in Java becomes mimetype in B4A. Now what about Images.Media.DATE_TAKEN and MediaStore.MediaColumns.DATA?
 
Top