1

Up until now I was using the following code

final Intent intent = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
return (intent.resolveActivity(PodcastAddictApplication.getInstance().getPackageManager()) != null);

But for some reasons, this returns false on devices even though they have a built-in equalizer (I know this because calling startActivityForResult(intent) on the previous intent works)

Any idea on how to solve this?

user1026605
  • 1,633
  • 4
  • 22
  • 58
  • Are you trying to figure out if the device as the Equalizer effect available or if it also has a UI control panel to control the Equalizer? – Steve M Aug 16 '22 at 23:45
  • Also the reason what you're doing doesn't work is probably because you're targeting Android 11 and package visibility was limited: https://developer.android.com/training/package-visibility – Steve M Aug 16 '22 at 23:56
  • Yes I'm targeting a recent version of Android, but even adding doesn't help here. Any idea how to fix this? – user1026605 Aug 17 '22 at 00:30
  • Also this works fine on some devices running Android 12, so it looks like this package visibility restriction isn't causing this – user1026605 Aug 17 '22 at 00:32

0 Answers0