Parsing a part of a string of unknown length

  title = com.substring(com.indexOf('AVRCP_MEDIA TITLE:') + 2, com.indexOf("\n")); // extract the title part of the string

Single quotes are for single characters. Please take a photo of your keyboard. Import it into Paint, and draw a circle around the ONE key you pressed to get that one character you are looking for in the first call to indexOf(). Post that picture.