Dear All :

   I'm a new to Android.

   I try to code a client API to allow the user to input some data in
an android 2.1 to send out through the bluetooth. The hyperterminal
can displays the received data in a Windows pc in the first time. But
When I input data the second time from the Android, the pc can't
receive the data any more.

My code is the below :
public void run() {
            adapter.cancelDiscovery();

                try {
                        Socket.connect();
                        BufferedOutputStream bout = new
BufferedOutputStream(Socket.getOutputStream());
                    bout.write(str1.getBytes());

                    bout.flush();
                    bout.close();
                    } catch (IOException connectException) {
                    Log.i("BT Client", "not connect");
                    try {
                        Socket.close();
                    } catch (IOException closeException) { }
                    return;
                }
            }

Can anyone help me?

Thanks in advanced.

BR,
Mark

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

Reply via email to