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 - Play a Sound - Help Me

Play a Sound - Help Me

All your problems with Audio, Video and Images.

Play a Sound - Help Me

Postby drag0zzo » Sun Feb 21, 2010 7:35 pm

Hello guys,
i would play e beep.mp3 in my android application when i show my AlertDialog.

How can i do it?

tnx
drag0zzo
Freshman
Freshman
 
Posts: 4
Joined: Sun Feb 07, 2010 10:17 pm

Top

Postby mrco » Tue Feb 23, 2010 2:03 pm

Try to use MediaPlayer
mrco
Experienced Developer
Experienced Developer
 
Posts: 71
Joined: Fri Jan 15, 2010 11:31 am
Location: 2V Software

Postby Damonh » Fri Feb 26, 2010 12:58 pm

- Put your sound file in res/raw directory (and make sure R.java updates)

- To create the mediaplayer use
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. MediaPlayer myplayer;
  2.  
  3. myplayer = MediaPlayer.create(getBaseContext(), R.raw.yoursoundfile);
Parsed in 0.010 seconds, using GeSHi 1.0.8.4


- To play the sound once use
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. myplayer.start();
Parsed in 0.010 seconds, using GeSHi 1.0.8.4
Damonh
Junior Developer
Junior Developer
 
Posts: 18
Joined: Thu Jan 21, 2010 3:56 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 4 guests