0

I want to apply equalizer changes to all apps. However, the use of 0 as a global session id was deprecated, you have to use:

        mEqualizer = new Equalizer(0, mPlayer.getAudioSessionId());

instead of mEqualizer = new Equalizer(0, 0);

According to Android, you can use ACTION_OPEN_AUDIO_EFFECT_CONTROL_SESSION to receive the id of a playing audio session:

Intent to signal to the effect control application or service that a new audio session is opened and requires audio effects to be applied.

However, how are you supposed to use it? I tried adding the constant in the manifest, but it didn't work:

<receiver android:name=".receivers.AudioSessionReceiver">
        <intent-filter>
            <action android:name="android.media.action.OPEN_AUDIO_EFFECT_CONTROL_SESSION"/>
        </intent-filter>
</receiver>

(when I play an audio file, or a music video, the receiver isn't called)

If this is not the way to apply audio (equalizer) settings to other apps, what is?

Update: I simply had issues with the Logcat, now it works, but only with Spotify and not other apps.

2
  • 1
    Hi, i had the same issue. I maybe wrong, but i think that depends on the app's media player sending the event (android.media.action.OPEN_AUDIO_EFFECT_CONTROL_SESSION). I tested with dezzer and my receiver was called only when i enabled the equalizer active option on the settings. Commented Apr 15, 2020 at 20:40
  • I have tried it and it works to me with Play Music app. I would like to use it with Google Meet, but I don't find how to make it work... Commented Jul 12, 2020 at 18:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.