Code example for AudioManager

Methods: setSpeakerphoneOn

0
 
    @CalledByNative 
    public void unregisterHeadsetReceiver() { 
        mContext.unregisterReceiver(mReceiver);
        mReceiver = null;
        mAudioManager.setSpeakerphoneOn(mOriginalSpeakerStatus);
    } 
 
    private void logDeviceInfo() { 
        Log.i(TAG, "Manufacturer:" + Build.MANUFACTURER +
                " Board: " + Build.BOARD + " Device: " + Build.DEVICE +
                " Model: " + Build.MODEL + " PRODUCT: " + Build.PRODUCT);
    } 
 
    @CalledByNative 
    private int getNativeOutputSampleRate() { 
        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) {
            String sampleRateString = mAudioManager.getProperty(
                    AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE);
            return (sampleRateString == null ?
Stop searching for code, let great code find you!  Add Codota to your java IDE