xajist / aacdecoder-android

GNU Lesser General Public License v3.0
0 stars 0 forks source link

Library doesnt work with android 5.0.2 #77

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. run the app in the eclipse simulator

I'm getting this : 

08-03 10:10:30.193: E/AACPlayer(2541): playAsync():
08-03 10:10:30.193: E/AACPlayer(2541): java.lang.NullPointerException: Attempt 
to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on 
a null object reference
08-03 10:10:30.193: E/AACPlayer(2541):  at 
com.android.app.project.dawkins.fragment.FragmentWebRadio$5.playerMetadata(Fragm
entWebRadio.java:849)
08-03 10:10:30.193: E/AACPlayer(2541):  at 
com.spoledge.aacdecoder.AACPlayer.processHeaders(AACPlayer.java:727)
08-03 10:10:30.193: E/AACPlayer(2541):  at 
com.spoledge.aacdecoder.MultiPlayer.processHeaders(MultiPlayer.java:108)
08-03 10:10:30.193: E/AACPlayer(2541):  at 
com.spoledge.aacdecoder.AACPlayer.play(AACPlayer.java:343)
08-03 10:10:30.193: E/AACPlayer(2541):  at 
com.spoledge.aacdecoder.AACPlayer$1.run(AACPlayer.java:306)
08-03 10:10:30.193: E/AACPlayer(2541):  at java.lang.Thread.run(Thread.java:818)
08-03 10:10:30.238: E/AndroidRuntime(2541): FATAL EXCEPTION: AACPlayer (1) - 
playAsync

What version of the product are you using? On which device ?
Works on my phone android 4.4
Doesn't work on simulator 5.0.2

It seems to be the same issues as preKitkat / kitKat version.

The app works on my phone (android 4.4) but not on my tab on 5.0.2

That solution doesn't work : 
 try {
            java.net.URL.setURLStreamHandlerFactory( new java.net.URLStreamHandlerFactory(){
                public java.net.URLStreamHandler createURLStreamHandler( String protocol ) {
                    Log.d( LOG, "Asking for stream handler for protocol: '" + protocol + "'" );
                    if ("icy".equals( protocol )) return new com.spoledge.aacdecoder.IcyURLStreamHandler();
                    return null;
                }
            });
        }
        catch (Throwable t) {
            Log.w( LOG, "Cannot set the ICY URLStreamHandler - maybe already set ? - " + t );
        }

Original issue reported on code.google.com by sepasgr...@gmail.com on 3 Aug 2015 at 12:07