Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Hi guys, just want to ask about SQLite and MediaPlayer

Hi guys, just want to ask about SQLite and MediaPlayer

Put your problem here if it does not fit any of the other categories.

Hi guys, just want to ask about SQLite and MediaPlayer

Postby xiiinookie » Mon Apr 23, 2012 9:11 am

I have my sqlite that saves "paths" of audio files from SD Card. Since SD Card had problem on special char, I used escape character (e.i. of my path = /sdcard/Music/A poem of bragi.mp3 which I convert to '/sdcard/Music/A poem of bragi.mp3' so that the sqlite accept it.) Now after saving, I'm gonna call it to another activity to play it. here's my code:

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.. :D
xiiinookie
Once Poster
Once Poster
 
Posts: 1
Joined: Mon Apr 23, 2012 9:02 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 10 guests