I have an activity where it shows an image from the phone`s sd card, and I have the path of the image that was passed from another activity to the current activity as an intent extra, example: //mnt/sdcard/DCIM/pic05.png
the path is stored in the database under the column named _data and there are other columns for each record that are there, like description and _display_name, how do I access these?
for example I have the path like the one shown above, pic05.png and I want to show the _display_name in a textview for that pic, that is what I am trying to find out how to do.
Simple SQL would do, based on a table:
You could simply:
Or in Java:
This is very simplified. You’ll need to pass the columns you want and use proper column-index when you access the cursor.