title: UDP Listener doesn't receive data
body: <p>I am trying to make a UDP Listener listening to a server and receiving data.</p>
  <p>Here is the UDPListener :</p>
  <pre><code>public class UDPListener extends AsyncTask&lt;Void, String, Void&gt;{
      public UDPConnector udpConnector;
  
      public UDPListener(UDPConnector udpConnector){
          byte[] buff;
      this.udpConnector = udpConnector;
      System.out.println(&quot;UDPListener initalized&quot;);
      }
  
      @Override
      protected Void doInBackground(Void... voidResult){
          Looper.prepare();
          while(true){
      
              byte[] buffer = new byte[512];
              DatagramPacket p = new DatagramPacket(buffer, buffer.length);
      
        
  
        try {
                  System.out.println(&quot;Message reçu debug &quot;);
                  udpConnector.UDPSocket.receive(p);
                  if(p.getData().length &gt; 0){
  
                      buffer = p.getData();
                      String s = new String(buffer, 0, p.getLength());
  
                      publishProgress(s);
                  }
              } catch (IOException e) {
                  e.printStackTrace();
  
              }
          }
      }
  
      @Override
      protected void onProgressUpdate(String... values) {
          super.onProgressUpdate(values);
          udpConnector.main.handleTextReceived(values[values.length-1]);
      }
  }
  </code></pre>
  <p>The problem is publishProgress() never gets executed. I am sure that the UDPConnector is well configured because i can send data to the server. And i know that the method doInBackground is executed. I am also sure that the serveur is sending data to me as i can receive it with other tools.</p>
  <p>I can post more code if needed, please let me know.</p>
  <p>Thanks</p>