How to getAudioSessionId?

A

AC Question

Hi,
In my code I'm using AudioManager for playing songs. I want to add Equalizer to the app. I'm using Equalizer class.

AudioManager manager = (AudioManager) SplashScreen.mApplicationContext.getSystemService(Context.AUDIO_SERVICE);

int audioSessionId = manager.generateAudioSessionId();

EqualizerModel.getInstance().setEqualizer(new Equalizer(0, audioSessionId));

But the problem is that I don't want to generate a new audio session ID, I want to get the current Audio session ID. Do you know how can I achieve it? I saw a few examples with MediaPlayer, but if I will use it, it's mean I need to completely implement from scratch media player and this is not what I want. I'm using the default media player of the phone and I wish to continue working with it.