So, this is a strange one. I have an app that uses permission INTERNET but am unable to access the Internet on any T-Mobile device. If the device is on wifi, the app works as intended. The app also has been tested with AT&T and Sprint devices and works as intended with or without a wifi connection.
Following, is a sample of code I use to connect with Google. The response returns as 200 and OK but the app throws an Exception on the last included line, as the content length is -1. All other Internet apps on the phone work as intended, i.e. are able to connect to the Internet. I tried throwing every available standard permission in my app and have had no luck. Anyone seen this before or have any idea? Thanks.
HttpClient httpClient = new DefaultHttpClient();
HttpContext localContext = new BasicHttpContext();
HttpGet httpGet = new HttpGet("http://www.google.com");
HttpResponse response = httpClient.execute(httpGet, localContext);
if(response.getStatusLine().getStatusCode() == 200) {
HttpEntity qrEntity = response.getEntity();
byte [] buffer = new byte[(int) qrEntity.getContentLength()];
It seems T-Mobile is blocking my API.
http://www.developer.nokia.com/Community/Wiki/T-Mobile_U.S._API_access_rights