Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/08/2012, 12:40
Avatar de diegovazgonz
diegovazgonz
 
Fecha de Ingreso: octubre-2010
Ubicación: Ourense
Mensajes: 184
Antigüedad: 13 años, 6 meses
Puntos: 11
Uso de datainputstream

hola amigos,con el siguiente programa que e creado tengo varios problemas
  • Necesito pulsar dos veces ENTER
  • Solo me funciona con Log ,pero con Toast falla
Código Android:
Ver original
  1. private class AcceptThread extends Thread {
  2.    
  3.     public void run() {
  4.         String textLine="";
  5.         try {
  6.             while(true){
  7.                 DataInputStream reader = new DataInputStream (mmSocket.getInputStream());
  8.        
  9.            
  10.              textLine = reader.readLine() + "\n";
  11.             Log.i(TAG,textLine);
  12.             textLine="";
  13.             }
  14.            
  15.            
  16.            
  17.         } catch (IOException e) {
  18.         }
  19.      
  20.         }
  21.     }