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
[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 - Does any one have this error using mediaplayer?

Does any one have this error using mediaplayer?

All your problems with Audio, Video and Images.

Does any one have this error using mediaplayer?

Postby edwinkcw » Fri Feb 27, 2009 10:09 am

Why is it occur?
Attempt to call getDuration without a valid mediaplayer.

How can I make a valid media player?
Thanks
edwinkcw
Developer
Developer
 
Posts: 38
Joined: Wed Feb 18, 2009 2:04 pm

Top

Postby metachris » Mon Mar 02, 2009 1:28 am

be sure to read and understand the Audio and Video docs on dev.android.com. That should do the trick, if you exchange sound_file_1 with your imported audio file):

Code: Select all
    MediaPlayer mp = MediaPlayer.create(context, R.raw.sound_file_1);
    mp.start();
metachris
Junior Developer
Junior Developer
 
Posts: 24
Joined: Sat Feb 07, 2009 11:40 am

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 5 guests