sockets - Android Bluetooth Can't Connect using createRfcommSocketServiceRecord -


i managed working using method @ android 2.3.3 version, testing using device 2.2 version.. , can find many devices using discovery, can't connect other devices using:

bluetoothsocket socket = devicetoconnect.createrfcommsockettoservicerecord(uuid.fromstring(my_uuid)); 

on other side, using proper thread accept connection using :

mbluetoothadapter.canceldiscovery();       bluetoothserversocket ss;     try {          ss = mbluetoothadapter.listenusingrfcommwithservicerecord(mainpage.sd_foldername, uuid.fromstring(my_uuid));         new thread(new listenerhandler(ss, this, resultcode)).start();      } catch (ioexception e) {         toast.maketext(this, "there problem opening bluetooth server socket!", toast.length_long).show();         finish();     } 

then on listenerhandler have this:

bluetoothsocket clientsocket = ss.accept(); 

but connection never stablished, thoughs? in advance!


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -