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 - Playing r.raw thru earpiece instead of speaker?

Playing r.raw thru earpiece instead of speaker?

All your problems with Audio, Video and Images.

Playing r.raw thru earpiece instead of speaker?

Postby androidiot » Thu Dec 08, 2011 5:41 pm

I'm trying to play a R.raw file thru my earpiece instead of the main phone speaker on my app but everyhting I throw at it isn't working. With my current code... it just plays very light static through the earpiece and not the R.raw I want.

Here is my code below and I set it in the manifest:
Code: Select all
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>


Code: Select all
AudioManager am = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
            am.setSpeakerphoneOn(false);
        am.setMode(AudioManager.MODE_IN_CALL);

        MediaPlayer tellSecret = MediaPlayer.create(this, R.raw.secret);
    tellSecret.setAudioStreamType(AudioManager.STREAM_VOICE_CALL);
    tellSecret.start();


Am I missing something here?
androidiot
Freshman
Freshman
 
Posts: 3
Joined: Wed Nov 23, 2011 7:25 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 16 guests