src/com/btwiz/library/BTWiz.java
public static void listenForConnectionsAsync(final String name, final IAcceptListener acceptListener, final SecureMode secureMode) {
		listeningIsOn = true;
		new Thread() {
			public void run() {
				try { 
					createBTServerSocket(name, secureMode);
				}
				catch (Exception e) {
					Log.e("BTWiz", "Socket creation error: " + e);
					acceptListener.onError(e, "createBTServerSocket");
					return;
				}
				
				try { 
					boolean goOn = true;
					while (listeningIsOn && goOn) {
						goOn = acceptConnection(acceptListener); 
					}
				}
				finally {
					closeBTServerSocket();
				}
			}
		}.start();
	}
/**
	 * Create a BT server, enter an accept loop and listen for BT connections 
	 * If AcceptMode==MANY: will stay in loop indefinitely
	 * 
	 * The secureMode param controls the secure mode of the server, i.e. weather listenUsingRfcommWithServiceRecord
	 * or listenUsingInsecureRfcommWithServiceRecord services will be called.
	 *    
	 * Spawns a dedicated connect thread 
	 */
Create a BT server, enter an accept loop and listen for BT connections
If AcceptMode==MANY: will stay in loop indefinitely

The secureMode param controls the secure mode of the server, i.e. weather listenUsingRfcommWithServiceRecord
or listenUsingInsecureRfcommWithServiceRecord services will be called.

Spawns a dedicated connect thread
Create a BT server enter an accept loop and listen for BT connections If AcceptMode == MANY : will stay in loop indefinitely The secureMode param controls the secure mode of the server i . e . weather listenUsingRfcommWithServiceRecord or listenUsingInsecureRfcommWithServiceRecord services will be called . Spawns a dedicated connect thread
public static void listenForConnectionsAsync(final String name, final IAcceptListener acceptListener, final SecureMode secureMode) {
		listeningIsOn = true;
		new Thread() {
			public void run() {
				try { 
					createBTServerSocket(name, secureMode);
				}
				catch (Exception e) {
					Log.e("BTWiz", "Socket creation error: " + e);
					acceptListener.onError(e, "createBTServerSocket");
					return;
				}
				try { 
					boolean goOn = true;
					while (listeningIsOn && goOn) {
						goOn = acceptConnection(acceptListener); 
					}
				}
				finally {
					closeBTServerSocket();
				}
			}
		}.start();
	}
public static void listenForConnectionsAsync ( final String name , final IAcceptListener acceptListener , final SecureMode secureMode ) { listeningIsOn = true ; new Thread ( ) { public void run ( ) { try { createBTServerSocket ( name , secureMode ) ; } catch ( Exception e ) { Log . e ( "BTWiz" , "Socket creation error: " + e ) ; acceptListener . onError ( e , "createBTServerSocket" ) ; return ; } try { boolean goOn = true ; while ( listeningIsOn && goOn ) { goOn = acceptConnection ( acceptListener ) ; } } finally { closeBTServerSocket ( ) ; } } } . start ( ) ; }
Create a BT server, enter an accept loop and listen for BT connections
 If AcceptMode==MANY: will stay in loop indefinitely
Create a BT server enter an accept loop and listen for BT connections If AcceptMode == MANY : will stay in loop indefinitely