Re: [android-developers] Re: Android bluetooth api connect to multiple devices at the same time

2010-12-22 Thread
I looked at  the
FBTClickLinkCompetehttp://code.google.com/p/apps-for-android/source/browse/#svn%2Ftrunk%2FBTClickLinkCompete
'source,
 for (int i = 0; i  Connection.MAX_SUPPORTED  myBSock == null; i++) {
for (int j = 0; j  3  myBSock == null; j++) {
myBSock = getConnectedSocket(myBtServer, mUuid.get(i));
if (myBSock == null) {
try {
Thread.sleep(200);
} catch (InterruptedException e) {
Log.e(TAG, InterruptedException in connect,
e);
}
}
}
}

This code fragment shows a client  that trys to connect the server... The
sample of SDK(BluetoothChat) used same code except
for (int i = 0; i  Connection.MAX_SUPPORTED  myBSock == null; i++) {
for (int j = 0; j  3  myBSock == null; j++) { 
I don't understand why?   what'more, it can't connect to multiple devices *at
the same time*!
Thanks!!!
















2010/12/21 Morrison Chang morrison.ch...@gmail.com

 Look at http://code.google.com/p/apps-for-android/
 Specifically the code for BTClickLinkCompete for a sample of Bluetooth
 connectivity.

 http://code.google.com/p/apps-for-android/source/browse/#svn%2Ftrunk%2FBTClickLinkCompete

 I think the air hockey sample supports 4 other devices along with the
 server device.

 -Morrison

 On Dec 20, 3:37 am, 苗鹏 mp870...@gmail.com wrote:
  could you share me your code?Thanks!
 
  2010/12/20 James 030440...@163.com
 
 
 
 
 
 
 
   of course you can,
 
   On Dec 18, 9:25 am, 苗鹏 mp870...@gmail.com wrote:
It is possible to connect simultaneously to multiple bluetooth
 devices?
 
   --
   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.comandroid-developers%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs
 cr...@googlegroups.com
   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 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 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 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

Re: [android-developers] Re: Android bluetooth api connect to multiple devices at the same time

2010-12-20 Thread
could you share me your code?Thanks!

2010/12/20 James 030440...@163.com

 of course you can,

 On Dec 18, 9:25 am, 苗鹏 mp870...@gmail.com wrote:
  It is possible to connect simultaneously to multiple bluetooth devices?

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 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 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

Re: [android-developers] Re: Android bluetooth api connect to multiple devices at the same time

2010-12-20 Thread
I will have a try! Thanks !

2010/12/21 Morrison Chang morrison.ch...@gmail.com

 Look at http://code.google.com/p/apps-for-android/
 Specifically the code for BTClickLinkCompete for a sample of Bluetooth
 connectivity.

 http://code.google.com/p/apps-for-android/source/browse/#svn%2Ftrunk%2FBTClickLinkCompete

 I think the air hockey sample supports 4 other devices along with the
 server device.

 -Morrison

 On Dec 20, 3:37 am, 苗鹏 mp870...@gmail.com wrote:
  could you share me your code?Thanks!
 
  2010/12/20 James 030440...@163.com
 
 
 
 
 
 
 
   of course you can,
 
   On Dec 18, 9:25 am, 苗鹏 mp870...@gmail.com wrote:
It is possible to connect simultaneously to multiple bluetooth
 devices?
 
   --
   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.comandroid-developers%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs
 cr...@googlegroups.com
   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 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 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 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

[android-developers] Android bluetooth api connect to multiple devices at the same time

2010-12-18 Thread
It is possible to connect simultaneously to multiple bluetooth devices?

-- 
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