tags:

views:

12

answers:

3

Hello, I have a folder with pictures and I'd like to make a search function to be able to find pictures that correspond to their key words. I'd like to know how you'd do this ?

I thought making a *.txt file with the name of the pictures and their corresponding key words, and then search in this text file the key words asked.

Is there a simpler way ? A better FileType (for instance *.ini) ?

Could you give me an advise. Thanks.

A: 

Is it an option that pictures contain file property -> tag and that you enter keywords to that property so you can search pictures by tags?

That way your picture will contain the keywords itself and that way there is no need to create extra files.

Just an idea...

Nikola Markezic
+1  A: 

You could use a simple sqlite database and query it with your keyword.

There are many Android Sqlite sample out in Google to get an idea how it works. Also see the Android dev docs http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html

Mathias Lin
Tutorial: http://www.devx.com/wireless/Article/40842
Mathias Lin
A: 

Well, Nikola's solution seems really fine, but I don't know if android can look at *.jpg tags.

Otherwise, you think that sqlite database is simpler than a text file ? (considering I've never use dataBase)

Nox
I don't know about the jpg tags/properties, haven't used this approach. DB isn't overly complex as it sounds at first sight. Just create one table with _id, image URL and keywords in it (3 columns total). Querying a database table is more elegant than reading and looping through lines in a text file. Performance-wise, for small number of images it shouldn't matter much. DB would just be more elegant I suppose.
Mathias Lin