How to escape single quotes and double quotes, if string is
t"'e'"s""t''
in other words how to escape quotes in string which have single and double quotes together.
The example something like this:
String whereClauseToTracks = MediaStore.Audio.Media.ARTIST + " = '" + artist + "' "; // t"'e'"s""t'' - instead of artist
Cursor cursorToTracks = mResolver.query(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI , new String[] { MediaStore.Audio.Media.ALBUM }, whereClauseToTracks, null, null);
I get sql lite exception when string contains quotes.
use
selectionArgsand?inselectionlike this: