Socket Programming

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

Re: Socket Programming

Postby amina88 » Thu Nov 11, 2010 2:55 pm

Hi all,
I suck at socket programming, I established a connection between server on pc and client on Android, but i have a problem when i try to send from the server to the client, the whole thing freezes and nothing happens.

here is the code of the server
Code: Select all
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;

import java.io.InputStreamReader;

import java.net.ServerSocket;

import java.net.Socket;







public class TCPDesktopServer implements Runnable{

    public static final String SERVERIP = "192.168.1.3";

    public static final int SERVERPORT = 4444;
    PrintWriter out;



    public void run() {
       int i=0;

         try {

                 System.out.println("S: Connecting...");

             ServerSocket serverSocket = new ServerSocket(SERVERPORT);

             while (true) {             

                 Socket client = serverSocket.accept();

                 System.out.println("S: Receiving...");



                 try {



                      BufferedReader in = new BufferedReader(new InputStreamReader(client.getInputStream()));
                      String str = in.readLine();
                      i++;
                      String []strArray = str.split("/");
                      System.out.println("S: Received: '" + str + "'");
                      System.out.println("[0]: "+strArray[0]);
                      if(strArray[strArray.length-1].equals("byye")){
                         i=0;
                      }else{
                         while(i>1){
                            System.out.println(i+" : dakhalt gowa el while");
                             str = in.readLine();
                              i++;
                              strArray = str.split("/");
                              System.out.println("S: Received: '" + str + "'");
                              System.out.println("[0]: "+strArray[0]);
                              if(strArray[0].equals("Login")){
                                  boolean login=loginCheck(strArray[1],strArray[2]);
                                 // boolean login = false;
                                 out = new PrintWriter( new BufferedWriter( new OutputStreamWriter(client.getOutputStream())),true);
                                  out.println(login);
                                  System.out.println(login);
                              }
                              if(!strArray[strArray.length-1].equals("byye")){
                                 i=0;
                              }
                      }
                     
                      }
                     

                   

                 } catch(Exception e) {

                        System.out.println("S: Error");

                        e.printStackTrace();

                   

                 }

             }     

         } catch (Exception e) {

             System.out.println("S: Error");

             e.printStackTrace();

         }

    }



    private boolean loginCheck(String user, String pass) {
      if(user.equals("Amina")&&pass.equals("supernina")){
         return true;
      }else{
         return false;
      }
   }

   public static void main (String a[]) {



        Thread desktopServerThread = new Thread(new TCPDesktopServer());

        desktopServerThread.start();

    }

}


and here is the code of the client on android
Code: Select all
package com.e2esp.socket.test;

import android.app.Activity;
import android.os.Bundle;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.InetAddress;
import java.net.Socket;
import android.util.Log;
import android.widget.*;
import android.view.*;

public class SocketTest extends Activity {
   
   private EditText username;
   private EditText password;
   private TextView status;

    /** Called when the activity is first created. */
   
   PrintWriter out;
   Socket socket;
   BufferedReader in;
    String str;

    @Override

    public void onCreate(Bundle icicle) {

        super.onCreate(icicle);

        setContentView(R.layout.main);

        this.connect();
        this.initLoginButton();
        this.username = (EditText)this.findViewById(R.id.ed_user);
        this.password = (EditText)this.findViewById(R.id.ed_pwd);
        status = (TextView) findViewById(R.id.status_log);

    }
   
     private void initLoginButton() {
        Button e = (Button) this.findViewById(R.id.bu_log);
      // listener
      e.setOnClickListener(new View.OnClickListener() {
         public void onClick(View v) {
           try {
            loginButtonClicked();
         } catch (IOException e) {
            e.printStackTrace();
         }
            }
         });
   }
   
    private synchronized void loginButtonClicked() throws IOException {
      String usern = this.username.getText().toString();
      String pass = this.password.getText().toString();
        out.println("Login/"+usern+"/"+pass+"byye");
        str = in.readLine();
        status.setText(str);
   }
   
    public void connect(){
       try {
          
            InetAddress serverAddr = InetAddress.getByName("192.168.1.3");

            Log.d("TCP", "C: Connecting...");

            socket = new Socket(serverAddr, 4444);

            String message = "Hello from Client android emulator";



                try {

                    Log.d("TCP", "C: Sending: '" + message + "'");
                    out = new PrintWriter( new BufferedWriter( new OutputStreamWriter(socket.getOutputStream())),true);
                    out.println(message);
                    Log.d("TCP", "C: Sent.");
                    Log.d("TCP", "C: Done.");
                    in = new BufferedReader(new InputStreamReader(socket.getInputStream()));                   

        } catch(Exception e) {
            Log.e("TCP", "S: Error", e);
                }



    } catch (Exception e) {

         Log.e("TCP", "C: Error", e);

    }

    }

}



Please help me I have a project to submit, and i can't seem to know what the problem is?!?
amina88
Once Poster
Once Poster
 
Posts: 1
Joined: Thu Nov 11, 2010 2:47 pm

Top

Re: Socket Programming

Postby PhonG » Mon Nov 15, 2010 1:16 pm

Hi all.

when my android server received a msg, how do I display to screen of emulator (or mobile)? I try with TextView but It's failure, and occurs error while running.

thanks for help.
PhonG
Freshman
Freshman
 
Posts: 2
Joined: Wed Nov 10, 2010 11:15 am

Re: Socket Programming

Postby DMacATTACK » Tue Nov 16, 2010 10:39 pm

PhonG wrote:Hi all.

when my android server received a msg, how do I display to screen of emulator (or mobile)? I try with TextView but It's failure, and occurs error while running.

thanks for help.


That's pretty generic. It could be many things like the textview object does not exist in the certain context. by default just use the Logcat to see your output.
User avatar
DMacATTACK
Experienced Developer
Experienced Developer
 
Posts: 58
Joined: Thu Dec 31, 2009 6:31 pm
Location: Canada

Re: Socket Programming

Postby PhonG » Wed Nov 17, 2010 6:23 am

DMacATTACK wrote:
PhonG wrote:Hi all.

when my android server received a msg, how do I display to screen of emulator (or mobile)? I try with TextView but It's failure, and occurs error while running.

thanks for help.


That's pretty generic. It could be many things like the textview object does not exist in the certain context. by default just use the Logcat to see your output.



Thank for your answer. I want to design a program chat over TCP. one thread server listen, one client send, so I need some method to display messages are received. what solution for that?
PhonG
Freshman
Freshman
 
Posts: 2
Joined: Wed Nov 10, 2010 11:15 am

Re: Socket Programming

Postby DMacATTACK » Wed Nov 17, 2010 8:08 pm

First off paste your message to the LogCat:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. //put message into a string
  3. String message = ....
  4.  
  5. Log.d("SOCKET TAG", "Received message " + message);
  6.  
  7.  
Parsed in 0.030 seconds, using GeSHi 1.0.8.4


Then if that works, access a TextView, perhaps by passing the instance of the TextView into the thread:

PSEUDO CODE:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. // onCreate  ....
  3. TextView text = (TextView) findViewById(R.id.text);
  4. Thread listener = new Thread(... , text);
  5.  
  6. //in the thread
  7. public void thread(..., ..., TextView text1)
  8. {
  9. //put message into a string
  10. String message = ....
  11.  
  12. text1.setText( "Recieved " + message);
  13.  
  14. }
  15.  
Parsed in 0.032 seconds, using GeSHi 1.0.8.4


This can technically be cross-threading if you're not careful. But the other alternative is to create a delegate.
User avatar
DMacATTACK
Experienced Developer
Experienced Developer
 
Posts: 58
Joined: Thu Dec 31, 2009 6:31 pm
Location: Canada

Re: Socket Programming

Postby paleman » Sun Dec 05, 2010 10:53 pm

Hello!

Is it possible to connect Client running on emulator with real internet socket server?

I wrote my real IP address and port in client emulator. I am logged in on my server where my listening server is running. Then i start my client and i try to send something to real internet. Nothing happens. I have all permissions ofcourse in manifest.

All worked when i am running on emulator with server and clinet. But i need it real.
I've tried to set:
redir add tcp:5000:5000
because my real internet socket server listens on port 5000. But nothing works!
thanks!
paleman
Once Poster
Once Poster
 
Posts: 1
Joined: Sun Dec 05, 2010 10:46 pm

Top

Re: Pass string from TCP server to main activity?

Postby madhunandan » Tue Dec 14, 2010 12:49 pm

qamerfarooq wrote:
plusminus wrote:Hello qamerfarooq,

thx for your contribution. :)

Could you approve your code also from emulator to another PC :?:

Regards,
plusminus


Yes i successfully executed it with my Desktop PC as Server and Android Client.

I made few changes (like replacing android logging with system.out etc.) in the TCPServer.java and executed it on my PC and successfully communicated with my desktop PC using TCPClient running on the emulator (after pointing the TCPClient to the desktop computer's IP).

Check the attached Files.



Hi qamerfarooq,

I have used your tcp server-client for my case. When the server is running and receives the message (str), I want to pass the string (str) back to the main activity (class xxx extends activity). Could you please help me with this? I will put the code below.

Server
public class TCPIPServer extends Activity implements Runnable{

public static final String SERVERIP = "127.0.0.1";
public static final int SERVERPORT = 7777;
//private final Handler mHandler;

//public TCPIPServer(Context context, Handler handler) {
// mHandler = handler;
//}

public void run() {
try {
Log.d("TCP","S: Connecting...");

ServerSocket serverSocket = new ServerSocket(SERVERPORT);
while (true) {

Socket client = serverSocket.accept();
Log.d("TCP","S: Receiving...");

try {
BufferedReader in = new BufferedReader(new InputStreamReader(client.getInputStream()));
String str = in.readLine();
Log.d("TCP","S: Received: '" + str + "'");
***//Pass str to main activity for parsing***
} catch(Exception e) {
Log.d("TCP","S: Error", e);
e.printStackTrace();
} finally {
client.close();
Log.d("TCP","S: Done danaadan.");
}

}

} catch (Exception e) {
Log.d("TCP","S: Error", e);
e.printStackTrace();
}
}


}



Main activity

public class TCPIPCommn extends Activity {

//private TCPIPServer mServer = null;
//mServer = new TCPIPServer(this, mHandler);

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

Thread cThread = new Thread(new TCPIPServer());

cThread.start();
}

//private final Handler mHandler = new Handler() {
//Function to extract name and value from the received message
public void extractData(String tempStr) {
code...
code...
}

//Function to display driver messages/images based on individual messages
public void actionOnData(String name, double value) {
code...
code...
}

}



Hope you reply soon. Thanks for any suggestion and time spent on this.

Cheers,
Madhu
User avatar
madhunandan
Junior Developer
Junior Developer
 
Posts: 10
Joined: Wed Dec 08, 2010 4:40 pm
Location: Rüsselsheim, Germany

Re: Socket Programming

Postby GregoryDee » Mon Dec 20, 2010 7:50 pm

I am having touble with my socket as well, it keeps stopping on this line:

outputStream = socket.getOutputStream();

here is the code I am using for the socket.

package com.test1220;

import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.net.InetAddress;
import java.net.Socket;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;

public class test1220 extends Activity {

private final String ipAddress = "192.168.10.201"; // ip of server pc.

private final int port = 49152;

Socket socket = null;

private EditText text;
private EditText send;

@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}


public void myClickHandler(View view) {
switch (view.getId()){
case R.id.Button03:

try {
socket = new Socket("192.168.10.201", 49152);
}
catch (IOException e)
{
}

OutputStream outputStream;
ObjectOutputStream objectOutputStream;

try
{
outputStream = socket.getOutputStream();
objectOutputStream = new ObjectOutputStream(outputStream);
objectOutputStream.writeObject("happy times");
objectOutputStream.flush();
outputStream.flush();
}
catch(IOException e)
{
}
break;
}
}
}

i feel like i have tried 15 different ways not just with output streams and this iseems to be the closest I have got.
GregoryDee
Freshman
Freshman
 
Posts: 2
Joined: Mon Dec 20, 2010 7:47 pm

Re: Socket Programming

Postby GregoryDee » Mon Dec 20, 2010 8:51 pm

I got my tcp connection to work and I can send anything, but at the end of every string is a line feed, \x0A, is there any way to get rid of that?
GregoryDee
Freshman
Freshman
 
Posts: 2
Joined: Mon Dec 20, 2010 7:47 pm

Re: Socket Programming

Postby ruben1988 » Sat Jan 08, 2011 11:49 am

Hi! first sorry about my bad english! I'm new in android and I'm doing a android program with sockets. I have a server in language java and a client in android but I can't made client communic with server! I have this code:

AndroidManifest:

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  3.      package="com.cliente"
  4.      android:versionCode="1"
  5.      android:versionName="1.0">
  6.  <user-permission android:name="android.permission.INTERNET"> </user-permission>
  7.       <user-permission android:name="android.permission.NETWORK">  </user-permission>
  8.     <application android:icon="@drawable/icon" android:label="@string/app_name"
  9.    android:permission="android.permission.INTERNET">
  10.         <activity android:name=".main"
  11.                  android:label="@string/app_name">
  12.                  
  13.             <intent-filter>
  14.                 <action android:name="android.intent.action.MAIN" />
  15.                 <category android:name="android.intent.category.LAUNCHER" />
  16.             </intent-filter>
  17.         </activity>
  18.  
  19.     </application>
  20.     <uses-sdk android:minSdkVersion="9" />
  21.        <permission android:name="android.permission.INTERNET"></permission>
  22. <permission android:name="android.permission.NETWORK"></permission>
  23. </manifest>
  24.  
Parsed in 0.005 seconds, using GeSHi 1.0.8.4


Client android:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. package com.cliente;
  2.  
  3. import java.io.ObjectInputStream;
  4. import java.io.ObjectOutputStream;
  5. import java.net.InetAddress;
  6. import java.net.Socket;
  7.  
  8. import android.app.Activity;
  9. import android.os.Bundle;
  10. import android.util.Log;
  11. import android.view.View;
  12. import android.view.View.OnClickListener;
  13. import android.widget.Button;
  14. import android.widget.TextView;
  15.  
  16. public class main extends Activity implements OnClickListener
  17. {
  18.    private Button client;
  19.    TextView testado;
  20.    
  21.     @Override
  22.     public void onCreate(Bundle savedInstanceState)
  23.     {
  24.         super.onCreate(savedInstanceState);
  25.         setContentView(R.layout.main);
  26.        
  27.         Log.d("C-TCP","CLIENTE INICIOU");
  28.        
  29.         testado=(TextView) this.findViewById(R.id.tvestado);
  30.         client =(Button) this.findViewById(R.id.Btnligar);
  31.         client.setOnClickListener(this);
  32.      }
  33.    
  34.    
  35.     @Override
  36.     public void onClick(View v)
  37.     {
  38.         if (v.getId() == R.id.Btnligar)
  39.         {
  40.             Thread t = new Thread(new TCPClient());
  41.             //Thread t = new Thread(new testecliente());
  42.             t.start();
  43.         }
  44.     }
  45. }
  46.  
Parsed in 0.040 seconds, using GeSHi 1.0.8.4


Thread TCP Client
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. package com.cliente;
  2.  
  3. import java.io.ObjectInputStream;
  4. import java.io.ObjectOutputStream;
  5. import java.net.InetAddress;
  6. import java.net.Socket;
  7.  
  8. import android.util.Log;
  9.  
  10. public class TCPClient implements Runnable {
  11.  
  12.     private String utilizador = "user1";
  13.     private String password = "userpass";
  14.     private int porto  = 4444;
  15.     private String host = "127.0.0.1";  //localhost
  16.     private int verifica_login = 2;
  17.     private Socket socket = null;
  18.     private ObjectOutputStream out = null;
  19.     private ObjectInputStream  in = null;
  20.    
  21.     @Override
  22.     public void run()
  23.     {
  24.         try  //criar ligação com a servidor
  25.          {
  26.          
  27.             InetAddress serverAddr = InetAddress.getByName(host);
  28.             Log.d("C-TCP", "C: Connecting...");
  29.             socket = new Socket(serverAddr,porto);  //conecta com a socket servidor
  30.             out = new ObjectOutputStream(socket.getOutputStream());  // escrever
  31.             in = new ObjectInputStream(socket.getInputStream());  // ler
  32.             Log.d("C-TCP","C: Connected with socket server");
  33.             //testado.setText("Connected with socket server");
  34.            
  35.             try  
  36.             {
  37.                 do
  38.                 {
  39.                     out.writeObject(utilizador);
  40.                     out.writeObject(password);
  41.                     verifica_login = (Integer)in.readObject();
  42.                
  43.                     if(verifica_login==0)Log.d("C-TCP","C: User invalid");
  44.                    
  45.                 }while(verifica_login!=1);
  46.                 Log.d("C-TCP","C: User loged");
  47.                
  48.             }
  49.             catch (Exception e)
  50.             {
  51.                  Log.d("C-TCP","C: Error", e);
  52.             }
  53.            
  54.         }
  55.         catch (Exception e)
  56.         {
  57.             //testado.setText("This socked not exist");
  58.               Log.d("C-TCP","C: NAO EXISTE This socked not exist!");
  59.         }
  60.        
  61.  
  62.     }
  63.  
  64. }
  65.  
Parsed in 0.045 seconds, using GeSHi 1.0.8.4


Server in java
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. import java.net.*;
  2. import java.util.ArrayList;
  3. import java.util.List;
  4. import java.io.*;
  5.  
  6. import javax.imageio.IIOException;
  7.  
  8. public class ServerTCP extends Thread
  9. {
  10.  
  11.     protected Socket clientSocket;
  12.     public static final int porto = 4444;
  13.  
  14.    
  15.     public static void main(String[] args) throws IOException
  16.     {
  17.        
  18.         System.out.println("S-TCP - SERVIDOR INICIOU");
  19.           try //estabelecer conecção com a socket
  20.           {
  21.               Boolean endconnection = false;
  22.               ServerSocket serversocket = new ServerSocket(porto);
  23.               System.out.println("S-TCP - Connection Socket Created in porto "+porto);
  24.              
  25.              
  26.               try //
  27.               {
  28.                   while(!endconnection) //esperar por um cliente
  29.                   {
  30.                        Socket socketcliente = serversocket.accept();
  31.                        Thread t = new Thread( new newConnection(socketcliente));  //cliente conectado --> cria nova thread                          
  32.                        t.start();
  33.                        System.out.println("S-TCP - New connection established");
  34.                   }
  35.               }
  36.               catch (Exception e)
  37.               {
  38.                   System.out.println("S-TCP - S: Error to start new client thread");
  39.               }
  40.           }
  41.           catch (Exception e)
  42.           {
  43.               System.out.println("S-TCP - S: Error to inicialize server"+ e);
  44.         }
  45.        
  46.     }
  47. }
  48.  
Parsed in 0.043 seconds, using GeSHi 1.0.8.4


And thread Server, but it is not import for now
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. import java.io.ObjectInputStream;
  3. import java.io.ObjectOutputStream;
  4. import java.net.Socket;
  5.  
  6.  
  7. public class newConnection implements Runnable {
  8.  
  9.     private Socket clientSocket; //socket que "vem" do cliente  
  10.  
  11.     newConnection(Socket socketcliente)
  12.     {
  13.        this.clientSocket= socketcliente;
  14.     }
  15.    
  16.     private int login(String utilizador, String password)
  17.     {
  18.         if(utilizador.equals("user1") && password.equals("userpass"))
  19.             return 1;
  20.         else
  21.             return 0;
  22.     }
  23.    
  24.     @Override
  25.     public void run() {
  26.  
  27.         try
  28.         {
  29.             ObjectInputStream in = new ObjectInputStream(clientSocket.getInputStream());// ler
  30.             ObjectOutputStream out = new ObjectOutputStream(clientSocket.getOutputStream());  // escrever
  31.            
  32.             String user_email;
  33.             String user_pass;
  34.            
  35.             do
  36.             {
  37.                 user_email = (String)in.readObject();
  38.                 user_pass = (String)in.readObject();
  39.                
  40.             }while(login(user_email,user_pass)==0);
  41.            
  42.         }
  43.         catch (Exception e)
  44.         {
  45.             System.out.println("C-TCP - C: Error"+ e);
  46.         }  
  47.    
  48.  
  49.     }
  50.  
  51. }
  52.  
Parsed in 0.042 seconds, using GeSHi 1.0.8.4



To do it run a do:
(1) start client android
(2) in cmd write tenet localhost 5554
(3) next in the same cmd write redir add tcp:4444:4444
(4) run Server
(5) in the client android press the button to communic with server..but it doesn't find the server. if I make a normal cliente in java with same code it's run normaly..!

I'm using eclipse emulator (I don'k have a phone android)
ruben1988
Freshman
Freshman
 
Posts: 5
Joined: Sat Jan 08, 2011 11:27 am

Re: Socket Programming

Postby cuse » Sun Jan 09, 2011 6:47 pm

Hello,

First of all, I am new to android programming and java. I am trying to make this sockettest.zip example work but I couldnt.

I am using eclipse. I created one Android project (for client) and one Java project (Server). Server project only has TCPServer.java file and ip adress is set to 127.0.0.1. When I run this I see S: Connecting... in the console.

On the android part, I have TCPServer.java, TCPClient.java and SocketTest.Java files in the package. The ip adress is set to my server computers ip adress which is 192.168.2.4 (trying to do this inside my home network). internet permission is also set in the manifest file.

When I run this on the emulator or copy .apk file to my nexus one, I get the error :

"Sorry!
The application Client1 (process com.e2esp.socket.test) has stopped unexpectedly. please try again"

I am very new to this so if anyone can explain me how to make this work i really appreciate.

Thanks in advance...

cuse
cuse
Freshman
Freshman
 
Posts: 3
Joined: Sun Jan 09, 2011 6:34 pm

Re: Socket Programming

Postby ruben1988 » Mon Jan 10, 2011 6:04 pm

cuse wrote:Hello,

First of all, I am new to android programming and java. I am trying to make this sockettest.zip example work but I couldnt.

I am using eclipse. I created one Android project (for client) and one Java project (Server). Server project only has TCPServer.java file and ip adress is set to 127.0.0.1. When I run this I see S: Connecting... in the console.

On the android part, I have TCPServer.java, TCPClient.java and SocketTest.Java files in the package. The ip adress is set to my server computers ip adress which is 192.168.2.4 (trying to do this inside my home network). internet permission is also set in the manifest file.

When I run this on the emulator or copy .apk file to my nexus one, I get the error :

"Sorry!
The application Client1 (process com.e2esp.socket.test) has stopped unexpectedly. please try again"

I am very new to this so if anyone can explain me how to make this work i really appreciate.

Thanks in advance...

cuse


Hi! try use the log to find your error...http://developer.android.com/reference/ ... l/Log.html
ruben1988
Freshman
Freshman
 
Posts: 5
Joined: Sat Jan 08, 2011 11:27 am

Re: Socket Programming

Postby cuse » Wed Jan 12, 2011 9:13 pm

thank you.

where do I get to see the log file? on the phone or on the PC? Eclipse creates log files in the project but I guess that is not what you are talking about...
cuse
Freshman
Freshman
 
Posts: 3
Joined: Sun Jan 09, 2011 6:34 pm

Re: Socket Programming

Postby madhunandan » Wed Jan 12, 2011 9:20 pm

cuse wrote:thank you.

where do I get to see the log file? on the phone or on the PC? Eclipse creates log files in the project but I guess that is not what you are talking about...


Hope I have understood the question rightly. There is the LogCat in Eclipse which can be used to see the information logged during execution of the program. And there is always the debug option in Eclipse which is quite powerful.
User avatar
madhunandan
Junior Developer
Junior Developer
 
Posts: 10
Joined: Wed Dec 08, 2010 4:40 pm
Location: Rüsselsheim, Germany

Re: Socket Programming

Postby cuse » Sun Jan 16, 2011 2:42 am

I cant get this thing to work. Can someone please help me? why am I getting this "stopped unexpectedly" on the emulator and on the actual device...

thank you...
cuse
Freshman
Freshman
 
Posts: 3
Joined: Sun Jan 09, 2011 6:34 pm

Top
PreviousNext

Return to General

Who is online

Users browsing this forum: No registered users and 3 guests