Cursor cAlarm = AlarmDB.rawQuery("SELECT * FROM " + CrazyAlarmMain.TABLE_ALARM + " WHERE _id = 1;", null);
if (cAlarm != null ) {
if(cAlarm.moveToFirst()) {
strName = cAlarm.getString(cAlarm.getColumnIndex("alarm_name"));
strRep = cAlarm.getString(cAlarm.getColumnIndex("alarm_custom"));
Log.v("count", strRep);
try {
mp.reset();
mp.setDataSource(String.valueOf(strRep));
mp.prepare();
mp.start();
} catch (IOException e) {
Log.v("count", "failed");
}
Since the strRep (which has been escaped char, produce a value of /sdcard/Music/A poem of bragi.mp3 which is ready to be played, it causes me some nullpointers which is so confusing..)
I hope you could help me about this guys... TIA..


