src/com/btwiz/library/BTWiz.java
public static void createBTServerSocket(String name, SecureMode secureMode) throws IOException {
		Utils.assertNotUIThread();
		assertInitialized();
		
		BluetoothServerSocket tmp;
		btServerSocket = null;
		try {
			if (secureMode == SECURE) {
				tmp = bluetoothAdapter.listenUsingRfcommWithServiceRecord(name, appUuid);
			}
			else { // INSECURE
				tmp = bluetoothAdapter.listenUsingInsecureRfcommWithServiceRecord(name, appUuid);
			}
			btServerSocket = tmp;
		} catch (IOException e) {
			Log.e("BTWiz", "listenUsingRfcomm error: " + e);
			e.printStackTrace();
			throw e;
		}		
	}
/**
	 * Creates a server socket to be used by the accept thread
	 */
Creates a server socket to be used by the accept thread
Creates a server socket to be used by the accept thread
public static void createBTServerSocket(String name, SecureMode secureMode) throws IOException {
		Utils.assertNotUIThread();
		assertInitialized();
		BluetoothServerSocket tmp;
		btServerSocket = null;
		try {
			if (secureMode == SECURE) {
				tmp = bluetoothAdapter.listenUsingRfcommWithServiceRecord(name, appUuid);
			}
			else { 
				tmp = bluetoothAdapter.listenUsingInsecureRfcommWithServiceRecord(name, appUuid);
			}
			btServerSocket = tmp;
		} catch (IOException e) {
			Log.e("BTWiz", "listenUsingRfcomm error: " + e);
			e.printStackTrace();
			throw e;
		}		
	}
public static void createBTServerSocket ( String name , SecureMode secureMode ) throws IOException { Utils . assertNotUIThread ( ) ; assertInitialized ( ) ; BluetoothServerSocket tmp ; btServerSocket = null ; try { if ( secureMode == SECURE ) { tmp = bluetoothAdapter . listenUsingRfcommWithServiceRecord ( name , appUuid ) ; } else { tmp = bluetoothAdapter . listenUsingInsecureRfcommWithServiceRecord ( name , appUuid ) ; } btServerSocket = tmp ; } catch ( IOException e ) { Log . e ( "BTWiz" , "listenUsingRfcomm error: " + e ) ; e . printStackTrace ( ) ; throw e ; } }
Creates a server socket to be used by the accept thread
Creates a server socket to be used by the accept thread
// INSECURE