3

There is a problem with HoloEverywhere and AACDecoder (com.spoledge.aacdecoder). When I try click play music from stream I get this:

12-13 09:50:33.044  24134-24225/com.example.aapxxx E/AACPlayer﹕ playAsync():
java.lang.NullPointerException
        at com.spoledge.aacdecoder.AACPlayer.dumpHeaders(AACPlayer.java:510)
        at com.spoledge.aacdecoder.AACPlayer.processHeaders(AACPlayer.java:497)
        at com.spoledge.aacdecoder.MultiPlayer.processHeaders(MultiPlayer.java:108)
        at com.spoledge.aacdecoder.AACPlayer.play(AACPlayer.java:280)
        at com.spoledge.aacdecoder.AACPlayer$1.run(AACPlayer.java:248)
        at java.lang.Thread.run(Thread.java:841)

I've implemented all 4 files into lib and selected aacdecoder jar as source.
HoloEverywhere is using android v4 19 0 1
I stuck and don't know how to fix it.
I'm using Android Studio. I followed as in tutorial here
Please help what to do.
Thanks in advance.
I'm trying to be runnin on 4.4
Works on lower versions.

I could use notpackaged project with sources instead ready jar of accplayer but I don't know how to manage it. Maybe there is just any small bug in theirs code..

Related problem discussion:
project page issue
Android Live Radio comments (second or third comment)


EDIT: 2014-01-09 - PROBABLY FIX

On main project page ACCPLAYER in issue ticket page has been uploaded FIX for kit kat.
Problem is related to changes in kiktat which was also mentioned on StackOverflow

Community
  • 1
  • 1
deadfish
  • 11,996
  • 12
  • 87
  • 136
  • Would be helpful if you paste more code how you prepare your PlayAsync method.. I had a lot of troubles with aac-streams in the past spoledge lib is a good alternative, but it`s not stable (at least it wasn`t 6months ago).. – longi Dec 13 '13 at 13:34

1 Answers1

2

One shot in the dark...sometimes the connection to stream fails, if there's no User-Agent set. But I'm not sure if your problem is because of your headers.. so please provide more (code)information. just for the record -> this is how you could set heards with android Mediaplayer. Check if AACDecoder has something similar too...

    //Setting HTTP header for fixing some issues with normal setDataSource Header from Android
    //User-Agent "iTunes" was set to force re-direct to shoutcast streaming url     
    Map<String, String> headers = new HashMap<String, String>();
    headers.put("User-Agent", "iTunes");

    setDataSource(context, uri, headers);

    prepareAsync();

(full answer here)

Community
  • 1
  • 1
longi
  • 11,104
  • 10
  • 55
  • 89