iammert / RadioPlayerService

Android service library which uses AAC Player. Ready to use Radio Player Service.
254 stars 91 forks source link

Attempt to invoke virtual method 'void co.mobiwise.library.RadioPlayerService.play(java.lang.String)' on a null object reference #73

Closed sbmvirdi closed 4 years ago

sbmvirdi commented 5 years ago

i am trying to use this in fragment but this error is showing mRadioManager = RadioManager.with(getActivity()); mRadioManager.registerListener(this); mRadioManager.enableNotification(true); mRadioManager.connect(); mRadioManager.startRadio(URL);

Dr-Legend commented 4 years ago

same for me to!

sbmvirdi commented 4 years ago

And he still has not replied

HaiNH-wh commented 4 years ago

i got same issue

colorgold commented 4 years ago

I remember getting this issue but forgot what I did. Here is the code I have in my fragment: if (radioManager == null) { radioManager = RadioManager.with(getActivity().getApplicationContext()); radioManager.registerListener(this); radioManager.setLogging(true); //this is optional }

sbmvirdi commented 4 years ago

Well i thing using exo player is more better to stream audio from server! I hereby glose this issue