ȸ¿ø°¡ÀԡžÆÀ̵ð/ºñ¹øã±â
ȨÀ¸·Î

³»Àå ½ºÇÇÄ¿·Î ¿¬°á Çϱâ
7³â Àü
¸¸¾à ÀÌ ¼Ò¸®¸¦ ³»À彺ÇÇÄ¿·Î ³»°í ½Í´Ù.
±Ùµ¥ ³»À彺ÇÇÄ¿°¡ ¹«½¼ ¸»À̳Ä! ±×³É ´Ù ¶È°°Àº ½ºÇÇÄ¿°¡ ¾Æ´Ï³Ä~!
³Ü ½ºÇÇÄ¿ Àε¥ ±â´ÉÀÌ Á» ´Ù¸¨´Ï´Ù.

¹Ù·Î ÀüÈ­ ÅëÈ­ ÇÒ¶§, »ó´ë¹æ ¸ñ¼Ò¸®°¡ µé¸®´Â ½ºÇÇÄ¿°¡ ³»Àå ½ºÇÇÄ¿ ÀÌ°í,
À½¾Ç Àç»ý ¾îÇÿ¡¼­ µé¸®´Â À½¾Ç ¼Ò¸®´Â ¿©·¯ºÐÀÌ ¾Ë°í °è½Ã´Â ¿ÜÀå ½ºÇÇÄ¿·Î º¸½Ã¸é µË´Ï´Ù.
µû¶ó¼­, ÀüÈ­ ÅëÈ­ ÇÒ¶§ ½ºÇÇÄ¿¸¦ ÄÑ¸é ³»Àå ½ºÇÇÄ¿°¡ ¿ÜÀå ½ºÇÇÄ¿·Î ¿Å°ÜÁö°Ô µÇ¾î
¼Ò¸®°¡ Ä¿Áö°Ô µÇ´Â °ÍÀÌÁÒ.

±×·³ ³»Àå ½ºÇÇÄ¿·Î ¾î¶»°Ô ¿¬°á ½Ãų±î¿ä?
¾Æ·¡ ÇÔ¼ö·Î ³¡ÀÔ´Ï´Ù.
// º¸À̽ºÄÝ ºÎºÐ Å×½ºÆ®
    public void playTest(Activity activity) {
        // ½ºÇÇÄ¿ ¿Â
//        AudioManager audioManager = (AudioManager) activity.getSystemService(Context.AUDIO_SERVICE);
//        audioManager.setSpeakerphoneOn(true);
        try {
            AssetFileDescriptor afd = activity.getAssets()
                    .openFd("sounds/test.mp3");
            mMediaPlayer = new MediaPlayer();
            mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength());
            mMediaPlayer.setAudioStreamType(AudioManager.STREAM_VOICE_CALL);
            afd.close();
            mMediaPlayer.prepare();
            mMediaPlayer.start();
        } catch (Exception e) {
            if (RingQConfig.DEBUG) e.printStackTrace();
        }
    }
Âü°í·Î test.mp3 ÆÄÀÏÀº app/src/main/assets/sounds/test.mp3 ¿¡ À§Ä¡ÇØ ÀÖ½À´Ï´Ù.
À§¿Í °°ÀÌ assets Æú´õ¿¡ ÀÕ´Â mp3 ÆÄÀÏÀ» Àоî¿Í¼­ MediaPlayer ¿¡ ¿¬°á ½Ãŵ´Ï´Ù.
À̺κбîÁö´Â ÀϹÝÀûÀ¸·Î MediaPlayer¸¦ ½ÇÇàÇÏ´Â ºÎºÐ°ú °°½À´Ï´Ù.

Ʋ¸° ºÎºÐÀº µü! setAudioStreamType ÇÔ¼ö°¡ Ãß°¡µÈ °ÍÀÔ´Ï´Ù.
AudioManagver.STREAM_VOICE_CALL ·Î ÁöÁ¤ÇÏ´Â ¼ø°£ ³»Àå ½ºÇÇÄ¿·Î MediaPlayer°¡ ÁöÁ¤µÇ¾î
Ç÷¹ÀÌ°¡ µÇ´Â °ÍÀÌÁÒ.

¼Ò½º¸¦ º¸´Ï ¿©·¯ ŸÀÔÀÇ StreamÀÌ Àֳ׿ä.
/** The audio stream for phone calls */
public static final int STREAM_VOICE_CALL = AudioSystem.STREAM_VOICE_CALL;
/** The audio stream for system sounds */
public static final int STREAM_SYSTEM = AudioSystem.STREAM_SYSTEM;
/** The audio stream for the phone ring */
public static final int STREAM_RING = AudioSystem.STREAM_RING;
/** The audio stream for music playback */
public static final int STREAM_MUSIC = AudioSystem.STREAM_MUSIC;
/** The audio stream for alarms */
public static final int STREAM_ALARM = AudioSystem.STREAM_ALARM;
/** The audio stream for notifications */
public static final int STREAM_NOTIFICATION = AudioSystem.STREAM_NOTIFICATION;
/** @hide The audio stream for phone calls when connected to bluetooth */
public static final int STREAM_BLUETOOTH_SCO = AudioSystem.STREAM_BLUETOOTH_SCO;
/** @hide The audio stream for enforced system sounds in certain countries (e.g camera in Japan) */
public static final int STREAM_SYSTEM_ENFORCED = AudioSystem.STREAM_SYSTEM_ENFORCED;
/** The audio stream for DTMF Tones */
public static final int STREAM_DTMF = AudioSystem.STREAM_DTMF;
/** @hide The audio stream for text to speech (TTS) */
public static final int STREAM_TTS = AudioSystem.STREAM_TTS;

±×¸®°í ÇÔ¼ö¿¡¼­ ÁÖ¼® ó¸®µÈ ºÎºÐÀÌ Àִµ¥¿ä. ÇØ´ç ºÎºÐÀ» È£Ãâ ÇÏ¸é ³»Àå ½ºÇÇÄ¿¿¡¼­ ¿ÜÀå ½ºÇÇÄ¿·Î º¯°æ µË´Ï´Ù. µü 2ÁÙ¸¸ ³Ö¾îÁÖ½Ã¸é µÇ¿ä ¤¾

AudioManager audioManager = (AudioManager) activity.getSystemService(Context.AUDIO_SERVICE);
audioManager.setSpeakerphoneOn(true);

Âü°íÇϽøé ÁÁÀ» µíÇÕ´Ï´Ù.
ÃßõÃßõ : 373 Ãßõ ¸ñ·Ï
¹øÈ£ Á¦¸ñ
1,226
android | ²¨Áø È­¸é¿¡¼­ ¾Û ½ÇÇàÇϱâ / Àáµç È­¸é ±ú¿ì±â / Àá±Ý È­¸é À§·Î ½ÇÇà/
1,225
android ÇöÀç WebView¿¡¼­ ¿ÜºÎ ÆäÀÌÁö ºÒ·¯¿À±â / WebView »õâ ¶ç¿ìÁö ¾Ê±â / WebViewClient
1,224
Activity ¸¦ dialog style·Î ¸¸µé±â
1,223
webview ¾Æ·¡ button ³Ö±â
1,222
webview scroll ±â´É ¸·±â(touch´Â µÊ)
1,221
Service µî·ÏÇϱâ
1,220
booting ÈÄ¿¡ ÀÚµ¿À¸·Î ½ÇÇà µÇ´Â app ¸¸µé±â
1,219
[Android] Intent È°¿ë ¿¹½Ã
1,218
Android ¼³Ä¡µÈ ¾îÇà ¸ñ·Ï PackageInfo¸¦ ÅëÇØ °¡Á®¿À±â ¹× ´Ù¸¥ ¾îÇà ½ÇÇà
1,217
[ANDROID(¾Èµå·ÎÀ̵å) ¾Û °³¹ß ±âÃÊ] MEDIAPLAYER À½¾Ç Àç»ýÇϱâ
1,216
[¾Èµå·ÎÀ̵å] ¿ÜºÎ ¾Û ½ÇÇà
1,215
¾Èµå·ÎÀÌµå ¼º´ÉÀ» À§ÇÑ ¼³°è
1,214
ÆÄÀÏ ¾÷·Îµå ¹× ÆĶó¸ÞÅÍ Àü¼Û (sending file & parameters by MultipartEntity / post)
1,213
MediaPlayer °¡·ÎÀÏ ¶§ UI ¼û±â°í Ç®½ºÅ©¸° ¸¸µé±â
1,212
À¥ºä¿¡¼­ html ÅÂ±× ¾ø¾Ö´Â ¹ý(Remove the html tag on loading web page in WebView)
1,211
´Ù¸¥ ¾Û ½ÇÇàÇϰųª Ç÷¹ÀÌ ½ºÅä¾î·Î À̵¿(Launch another app by code)
1,210
À¥ ºä¿¡¼­ ÅÂ±× Á¤º¸ ÃàÃâÇϱâ(Get the information of html tag in WebView of android)
1,209
ÀÚµ¿À¸·Î ¿¡µðÆ®ºä¿¡ Æ÷Ä¿½º µÇ´Â °Í ¸·±â
1,208
addJavascriptInterface ¿À·ù(Android WebView.addJavascriptInterface not Working)
1,207
Ä¿½ºÅÒ Å佺Ʈ ¶ç¿ì±â(To show Custom Toast)
1,206
À¥¿¡¼­ ÆÄÀÏ »çÀÌÁî¿Í ÄÜÅÙÆ®(ÄÁÅÙÃ÷) ŸÀÔ ¾Ë¾Æº¸´Â »ùÇÃÄÚµå
1,205
¾Èµå·ÎÀ̵å ÅؽºÆ® ºä¿¡¼­ Áö¿øÇÏ´Â HTML ű׵é
1,204
ÀÎÅÍ³Ý ÁÖ¼Ò À¯È¿¼º °Ë»ç (regular expression for url)
1,203
SpannableStringÀ¸·Î ÅؽºÆ® ºä¿¡ ¾ÆÀÌÄÜ ³Ö´Â ¹ý
1,202
½ÇÇà°¡´ÉÇÑ ¾Û ¸ñ·Ï (Get launchable apps in android)
1,201
HTMLÀ» ¾Èµå·ÎÀ̵å À¥ºä¿¡ ¸ðµÎ º¸ÀÌ°Ô Çϱâ Using WebView ViewPort in android
1,200
so ÆÄÀÏ ¾Èµå·ÎÀÌµå ½ºÆ©µð¿À¿¡¼­ »ç¿ëÇÏ´Â ¹ý
1,199
[¾Èµå·ÎÀ̵å] È­¸é »çÀÌÁî ±¸Çϱâ
1,198
[¾Èµå·ÎÀ̵å] ¾Èµå·ÎÀÌµå ½ºÆ©µð¿À¿¡¼­ ºôµå ÆÄÀÏ À̸§ ¼öÁ¤Çϱâ.
1,197
¿ÜºÎ ¾Û ½ÇÇà½ÃÅ°±â (launch external app in android)
¸ñ·Ï
¹ÂÁ÷Æ®·ÎÆ® ºÎ»ê±¤¿ª½Ã ºÎ»êÁø±¸ °¡¾ßµ¿ ¤Ó °³ÀÎÁ¤º¸Ãë±Þ¹æħ
Copyright ¨Ï musictrot All rights reserved.