Got this error while initializing Visualizer
visualizer = new Visualizer(mediaPlayer.getAudioSessionId()); <----
Error: Cannot initialize Visualizer engine, error: -3 java.lang.RuntimeException: Cannot initialize Visualizer engine, error: -3
NB : This is only happening in Marshmallow
Got the cause of the problem !!!
This is caused for dynamic permission problem for Marshmallow.
It requires RECORD_AUDIO permission to initialize it.
I need to give permission Manifest.permission.RECORD_AUDIO before initialize the visualizer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With