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

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

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 - Exception while calling prepare in media player

Exception while calling prepare in media player

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

Exception while calling prepare in media player

Postby kartik_saltriver » Thu Apr 16, 2009 1:34 pm

Hello, I am using linux so i have installed Android in it. I am getting the exception while calling prepare() from MediaPlayer object. The following is my code.


File bufferedFile = new File(context.getCacheDir(),"playingMedia" + (counter++) + ".dat");

moveFile(downloadingMediaFile,bufferedFile);

Log.e("Player",bufferedFile.length()+"");
Log.e("Player",bufferedFile.getAbsolutePath());

mediaPlayer = new MediaPlayer();
mediaPlayer.setDataSource(bufferedFile.getAbsolutePath());
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
System.out.println("before preapare");
mediaPlayer.prepare();

I am adding the code tutoril also so if any one of you have few minutes then please check it. Accoridng to my opiong it i facing some problem in accessing file system so. Can some one tell me what could be wrong in it ?

another thing which i want to know is Can some one tell me context.getCacheDir()
Attachments
tutorial3.zip
(130 KiB) Downloaded 87 times
kartik_saltriver
Freshman
Freshman
 
Posts: 7
Joined: Wed Apr 01, 2009 5:50 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot], MSNbot Media and 11 guests