Hi T-mobile folks,
I am facing a issue on some of the Samsung devices. - SGH-T619, Samsung t 219, Samsung t 329
Issue - Not able to connect to internet, even after signing with T-mobile (using this link - http://portal.truenorthservice.com) . The device will get restarted, at getResponseCode(),
When I execute the below code on the SGH-T619, the device will get restarted.
Code :
---------------
public void sendRequest()
{
try
{
int nRc ;
String dis = "";
String errormsg = "";
connect_to_server();
connect_and_set_header();
System.out.println("Before getResponseCode..... ");
nRc = m_hCon.getResponseCode();
System.out.println("After getResponseCode..... ");
writeRecord("dsml nRC = " + nRc + " count = " + count);
}
catch (Exception e)
{
error = error + "\n" + (" Operation Failed 106: " + e.getMessage());
displayerroralert(error);
}
}
public void connect_to_server()
{
try
{
m_hCon =
(HttpConnection)
Connector.open("http://google.com", Connector.READ_WRITE, true ); // true == want timeout exceptions
}
catch (IllegalArgumentException exIA)
{
}
catch (ConnectionNotFoundException exCN)
{
}
catch (IOException ioe )
{
}
catch (Exception e )
{
}
}
public void connect_and_set_header()
{
try
{
m_hCon.setRequestProperty( "Content-Type", "text/xml" );
m_hCon.setRequestProperty( "Cache-Control","no-cache" );
m_hCon.setRequestProperty( "X-MVIP-Ver", "3.0.1");
m_outputStream = m_hCon.openOutputStream();
m_wireWriter =
new OutputStreamWriter( m_outputStream);
Thread.sleep(100);
m_wireWriter.write(strXml);
Thread.sleep(100);
}
catch (Exception e)
{
}
}
--------
Here, I am not getting any exception during Connector.open. The code till nRc = m_hCon.getResponseCode(); will get executed properly, i.e I am able to see the message "Before getResponseCode.....". Once the code line nRc = m_hCon.getResponseCode(); executed the device gets restarts.
In my app I am using https url, but the same issue is reproducible with google.com as well. I have selected "Samsung T619" for Samsung SHG-T619, during signing...
May I know what might be the reason, because I am facing this problem even after signing with T-mobile. Is it Signing issue with T-mobile?