Any errors on you logcat?

Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com



On Wed, May 25, 2011 at 4:42 AM, ingy abbas <[email protected]> wrote:

>
> its create the socket between my android Mobile and my python server
> but why its didnt send the cmd string  to the python ???!!
>
>
>
>  public void connect(View view){
>
>
>
>
>                            try {
>                                String cmd=("My current location is: " );
>                                clientSocket= new
> Socket("192.168.1.2",54636);
>                                Text.append( "\n created a socket");
>                                outToServer = new
> DataOutputStream(clientSocket.getOutputStream());
>                                Text.append( "\n created a datastream");
>                                inFromServer = new BufferedReader(new
> InputStreamReader(clientSocket.getInputStream()));
>                                Text.append( "\n created a bufferReader");
>                               InetSocketAddress address1 = new
> InetSocketAddress("192.168.1.2",54636);
>                               Text.append( "\n created a socket");
>                                DatagramPacket request = new
> DatagramPacket(cmd.getBytes(), cmd.length(), address1);
>
>                                DatagramSocket socket = new
> DatagramSocket();
>
>                                socket.send(request);
>
>                            } catch (SocketException e) {
>
>                                 e.printStackTrace();
>                                }
>
>        catch(Exception e){
>                System.out.println("Error");
>        }
>    }
>    }
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to