How to get the default Equalizer to work with my current Audio Session ID
up vote
2
down vote
favorite
I want to make the users default equalizer work with my app, but I can't seem to get my app audio session to connect with the equalizer even though I am passing it my Audio Session ID etc.
Here is my code:
Intent i = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
i.putExtra(AudioEffect.EXTRA_AUDIO_SESSION, MusicPlayerService.getMPSessionId());
startActivityForResult(i, 11113);
I am using the code above to launch the user's default Equalizer.
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK) {
System.out.println("RESULT_OK");
Equalizer equalizer = new Equalizer(0,MusicPlayerService.getMPSessionId());
equalizer.setEnabled(true);
return;
}
}
And then I am using the code above to apply enable and apply it. What am I doing wrong here? I have a few apps on my phone that use the stock Equalizer and they all work fine.
If somebody could help me out, that would be highly appreciated, thanks.
android android-mediaplayer equalizer
add a comment |
up vote
2
down vote
favorite
I want to make the users default equalizer work with my app, but I can't seem to get my app audio session to connect with the equalizer even though I am passing it my Audio Session ID etc.
Here is my code:
Intent i = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
i.putExtra(AudioEffect.EXTRA_AUDIO_SESSION, MusicPlayerService.getMPSessionId());
startActivityForResult(i, 11113);
I am using the code above to launch the user's default Equalizer.
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK) {
System.out.println("RESULT_OK");
Equalizer equalizer = new Equalizer(0,MusicPlayerService.getMPSessionId());
equalizer.setEnabled(true);
return;
}
}
And then I am using the code above to apply enable and apply it. What am I doing wrong here? I have a few apps on my phone that use the stock Equalizer and they all work fine.
If somebody could help me out, that would be highly appreciated, thanks.
android android-mediaplayer equalizer
1
Did you find any solution ? If yes can you please share it ?
– akshay7692
Jul 25 '16 at 14:52
1
Hi, did you find any solution?
– NehaK
Jul 18 '17 at 12:14
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I want to make the users default equalizer work with my app, but I can't seem to get my app audio session to connect with the equalizer even though I am passing it my Audio Session ID etc.
Here is my code:
Intent i = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
i.putExtra(AudioEffect.EXTRA_AUDIO_SESSION, MusicPlayerService.getMPSessionId());
startActivityForResult(i, 11113);
I am using the code above to launch the user's default Equalizer.
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK) {
System.out.println("RESULT_OK");
Equalizer equalizer = new Equalizer(0,MusicPlayerService.getMPSessionId());
equalizer.setEnabled(true);
return;
}
}
And then I am using the code above to apply enable and apply it. What am I doing wrong here? I have a few apps on my phone that use the stock Equalizer and they all work fine.
If somebody could help me out, that would be highly appreciated, thanks.
android android-mediaplayer equalizer
I want to make the users default equalizer work with my app, but I can't seem to get my app audio session to connect with the equalizer even though I am passing it my Audio Session ID etc.
Here is my code:
Intent i = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
i.putExtra(AudioEffect.EXTRA_AUDIO_SESSION, MusicPlayerService.getMPSessionId());
startActivityForResult(i, 11113);
I am using the code above to launch the user's default Equalizer.
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK) {
System.out.println("RESULT_OK");
Equalizer equalizer = new Equalizer(0,MusicPlayerService.getMPSessionId());
equalizer.setEnabled(true);
return;
}
}
And then I am using the code above to apply enable and apply it. What am I doing wrong here? I have a few apps on my phone that use the stock Equalizer and they all work fine.
If somebody could help me out, that would be highly appreciated, thanks.
android android-mediaplayer equalizer
android android-mediaplayer equalizer
edited Aug 30 '15 at 19:42
asked Aug 30 '15 at 19:33
Jack
1,02352757
1,02352757
1
Did you find any solution ? If yes can you please share it ?
– akshay7692
Jul 25 '16 at 14:52
1
Hi, did you find any solution?
– NehaK
Jul 18 '17 at 12:14
add a comment |
1
Did you find any solution ? If yes can you please share it ?
– akshay7692
Jul 25 '16 at 14:52
1
Hi, did you find any solution?
– NehaK
Jul 18 '17 at 12:14
1
1
Did you find any solution ? If yes can you please share it ?
– akshay7692
Jul 25 '16 at 14:52
Did you find any solution ? If yes can you please share it ?
– akshay7692
Jul 25 '16 at 14:52
1
1
Hi, did you find any solution?
– NehaK
Jul 18 '17 at 12:14
Hi, did you find any solution?
– NehaK
Jul 18 '17 at 12:14
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
mAudioSession = mp.getAudioSessionId();
try {
final Intent effects = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
effects.putExtra(AudioEffect.EXTRA_PACKAGE_NAME, this.getPackageName());
effects.putExtra(AudioEffect.EXTRA_AUDIO_SESSION, mAudioSession);
startActivityForResult(effects, 0);
} catch (Exception e) {
// ignored. Whee!
}
First add this code, int mAudioSession = 0;
, above mAudioSession line, if that makes sense. This code should work, tested it and it works fine. I think what youre missing is, Package name, Also you don't need
equalizer.enabled` true, it won't do anything at all, I think that's for making you're own equalizer. Also I think you can use equalizer.setenabled(true) etc.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
mAudioSession = mp.getAudioSessionId();
try {
final Intent effects = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
effects.putExtra(AudioEffect.EXTRA_PACKAGE_NAME, this.getPackageName());
effects.putExtra(AudioEffect.EXTRA_AUDIO_SESSION, mAudioSession);
startActivityForResult(effects, 0);
} catch (Exception e) {
// ignored. Whee!
}
First add this code, int mAudioSession = 0;
, above mAudioSession line, if that makes sense. This code should work, tested it and it works fine. I think what youre missing is, Package name, Also you don't need
equalizer.enabled` true, it won't do anything at all, I think that's for making you're own equalizer. Also I think you can use equalizer.setenabled(true) etc.
add a comment |
up vote
0
down vote
mAudioSession = mp.getAudioSessionId();
try {
final Intent effects = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
effects.putExtra(AudioEffect.EXTRA_PACKAGE_NAME, this.getPackageName());
effects.putExtra(AudioEffect.EXTRA_AUDIO_SESSION, mAudioSession);
startActivityForResult(effects, 0);
} catch (Exception e) {
// ignored. Whee!
}
First add this code, int mAudioSession = 0;
, above mAudioSession line, if that makes sense. This code should work, tested it and it works fine. I think what youre missing is, Package name, Also you don't need
equalizer.enabled` true, it won't do anything at all, I think that's for making you're own equalizer. Also I think you can use equalizer.setenabled(true) etc.
add a comment |
up vote
0
down vote
up vote
0
down vote
mAudioSession = mp.getAudioSessionId();
try {
final Intent effects = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
effects.putExtra(AudioEffect.EXTRA_PACKAGE_NAME, this.getPackageName());
effects.putExtra(AudioEffect.EXTRA_AUDIO_SESSION, mAudioSession);
startActivityForResult(effects, 0);
} catch (Exception e) {
// ignored. Whee!
}
First add this code, int mAudioSession = 0;
, above mAudioSession line, if that makes sense. This code should work, tested it and it works fine. I think what youre missing is, Package name, Also you don't need
equalizer.enabled` true, it won't do anything at all, I think that's for making you're own equalizer. Also I think you can use equalizer.setenabled(true) etc.
mAudioSession = mp.getAudioSessionId();
try {
final Intent effects = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
effects.putExtra(AudioEffect.EXTRA_PACKAGE_NAME, this.getPackageName());
effects.putExtra(AudioEffect.EXTRA_AUDIO_SESSION, mAudioSession);
startActivityForResult(effects, 0);
} catch (Exception e) {
// ignored. Whee!
}
First add this code, int mAudioSession = 0;
, above mAudioSession line, if that makes sense. This code should work, tested it and it works fine. I think what youre missing is, Package name, Also you don't need
equalizer.enabled` true, it won't do anything at all, I think that's for making you're own equalizer. Also I think you can use equalizer.setenabled(true) etc.
edited Nov 13 at 20:42
answered Nov 11 at 2:36
william shaw
11
11
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f32300365%2fhow-to-get-the-default-equalizer-to-work-with-my-current-audio-session-id%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Did you find any solution ? If yes can you please share it ?
– akshay7692
Jul 25 '16 at 14:52
1
Hi, did you find any solution?
– NehaK
Jul 18 '17 at 12:14