Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Device Disconnect auto

Device Disconnect auto

Put your problem here if it does not fit any of the other categories.

Device Disconnect auto

Postby mithat » Fri Feb 11, 2011 4:59 pm

Hi everybody !
Help me, my application connect to server. i use the following code:
Code: Select all
public class HttpConnections {

   private HttpURLConnection conn = null;
   private URL url = null;
//   public HttpConnection(HttpsURLConnection conn){
//      this.conn = conn;
//   }
   public HttpURLConnection setConnection(){
      try{
         Parameters.connected = true;
         url = new URL(Parameters.url);
      }catch(MalformedURLException e){
         Parameters.connected = false;
         e.printStackTrace();
         return conn;
      }
      if(url!=null){
         try{
            System.setProperty("http.keepAlive", "false");
            conn = (HttpURLConnection) url.openConnection();
            conn.setRequestMethod("POST");
            conn.setRequestProperty("content-type", "text/plain; charset=utf-8");
            conn.setDoInput(true);
            conn.setDoOutput(true);
            conn.setUseCaches(false);
            Parameters.connected = true;
            conn.connect();
            
         }catch(IOException e){
            e.printStackTrace();
            Parameters.connected = false;
            System.out.println("Erorr connection!");
            return conn;
         }
      }
      return conn;
   }
   public void disconnection(HttpURLConnection conn){
      conn.disconnect();
   }
}


Normally, when the application is still connected and fine. But when the used application and device to switch to standby mode screen.After about 2 hours, i turned back application but receive message: application disconection. I'm on the internet via IE brower not to be. I use the 3G network.
Was it because the device manager or by code?. I reinstalled on the 3G network, connection back to normal. Expect people to help me. Thanks
mithat
Junior Developer
Junior Developer
 
Posts: 14
Joined: Thu Jul 29, 2010 5:05 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 18 guests