I have been working on a MediaPlayer app, where I use the MediaStore.Audio.Media to get all the songs on the SD card and their title, album, artist, etc. tags. I have a custom adapter where I want to check if the Artist field is empty, so I could set "Artist unknown" for that field. The adapter and the cursor I use are in my opinion irrelevant to this question so I'm not going to paste any code here, since this problem occurs outside the adapter as well.
Here is the problem: when an mp3 song doesn't have an artist tag, the cursor for the artist field (the MediaStore.Audio.Media.ARTIST field) returns "". I have no idea what kind of data type that is (it should be String) because whenever I compare it to a String with the value "", the comparison is false. Even if I assign the return value of that field to a temporary String, and than compare that with the before mentioned "", I still get false. I even tried null, "unknown", "", nothing works. I've really hit a dead end here and any kind of help would be greatly appreciated.
Thank you in advance, Ivan.