This interface is used to notify the BluetoothProfile clients when they are connected or disconnected from the service. The must implemented methods for this interface are onServiceConnected() and onServiceDisconnected().
BluetoothProfile.ServiceListener leServiceListener = new BluetoothProfile.ServiceListener() { @Override public void onServiceConnected(int profile, BluetoothProfile proxy) { //Do something upon receiving a service connection } @Override public void onServiceDisconnected(int profile) { //Do something upon receiving a service disconnection } };