I try work this out for some day and I just can’t figured out. I am programem for android and have class that get data from server. Everything works well if I am connected to WiFi, but if I turned WiFi off to Mobile connection it works only on few phones. (Works on Galaxy Note, don’t work on Galaxy Nexus and Galaxy 2)
code is very simple:
public void execute(DSRESTCommand command) throws DBXException {
HttpClient client = null;
HttpUriRequest method = CreateRequest(command);
client = getHttpClient();
HttpResponse response = client.execute(method);
setSessionIdentifier(response);
throwExceptionIfNeeded(response)
String s = EntityUtils.toString(response.getEntity());
I tested this in debug mode and it turs it out that client and command are identical when it works and when it does not.
Only different that I can see in debug mode is response
string s whit WiFi on (and on Galaxy Note)look like :
{"result":["Cube tree loaded ... size: 3657",[60,63,120,109,108,32,118,...
whit WiFi off it looks like:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="FEHLER" title="ERROR">
<p>
The requested item could not be loaded <br/>
Wrong MIME-Type
<do type="prev" label="back">
<prev/>
</do>
</p>
</card>
</wml>
Can anyone know why this happend ? Please help me out.
I find the problem to my question. I will post it for those who has similar problem.
It turned up to be the problem in mobile settings. All I have to do was delete Proxy from my APN in phone