I create photo. I need to add a user comment in exif. I try next code
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
if (exifInterface != null){
try {
exifInterface.setAttribute("UserComment", charSequence.toString());
exifInterface.saveAttributes();
} catch (IOException e) {
e.printStackTrace();
}
}
}
I also tried to convert a string to UTF-8
exifInterface.setAttribute("UserComment", new String(charSequence.toString().getBytes(), "UTF-8"));
Cyrillic characters are stored as "?"
Help!