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 - Total newb here....need help playing audio

Total newb here....need help playing audio

All your problems with Audio, Video and Images.

Total newb here....need help playing audio

Postby plays2 » Fri Oct 05, 2012 4:12 am

Alright so i have never ever ever made an android app before and im pretty new to java as well.....I'm trying to make it so that (in my app) when i press a button, it would play a sound. And i just cant figure it out. ive searched everywhere, so pleaaassseee help me! i've tried something like this...
@Override
public void onClick(View view) {
MediaPlayer mp = MediaPlayer.create(this, R.raw.a2);
mp.start();
}

and yes i put the a2.mp3 into the res/raw folder
But i get an error that says "Unexpected text found in layout file: "@Override public void onClick(View view)
{ MediaPlayer mp = MediaPlayer.create(this, R.raw.a2);" What do i need to do?
again i'm just starting with java and android so don't gat mad at me(: thanks!
plays2
Once Poster
Once Poster
 
Posts: 1
Joined: Fri Oct 05, 2012 4:05 am

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 18 guests