Skip to content Skip to sidebar Skip to footer

Android 4.4 Http Api Bugs?

I decided to start testing my app with Android 4.4 and noticed that the Android HTTP connection APIs are much stricter than before? I have never had this issue and I assume it is s

Solution 1:

On Android 4.4 things did change under the hood and the none standard SHOUTcast ICY header response is no longer supported. Just like the Apache HTTPClient library.

What I had to do can be found on this post: How to parse a none standard HTTP response?

Solution 2:

Jona answer is right, but if you are using AACPlayer(https://code.google.com/p/aacplayer-android/) to play your SHOUTcast, here is a simpler solution: https://code.google.com/p/aacdecoder-android/wiki/HandlingShoutcastStreams

Also, I needed to change my url from "http://example.org" to "icy://example.org"

Solution 3:

I've implemented a solution based on the Apache HttpClient, you can find it as a gist here.

Here is how to use it:

IcyGetRequestrequest=newIcyGetRequest(urlStr);
HttpResponseresponse= request.get();
intresponseCode= response.getStatusLine().getStatusCode();

Post a Comment for "Android 4.4 Http Api Bugs?"