Android Open Source - bluetooth Client Link






From Project

Back to project page bluetooth.

License

The source code is released under:

MIT License

If you think the Android project bluetooth listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.mauriciotogneri.bluetooth.connection.client;
/*from w  w w .jav  a 2  s.  c  om*/
import java.io.IOException;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothSocket;
import com.mauriciotogneri.bluetooth.connection.kernel.ConnectionThread;

class ClientLink extends ConnectionThread
{
  private final ClientEvent clientEvent;
  
  public ClientLink(BluetoothSocket socket, ClientEvent clientEvent) throws IOException
  {
    super(socket);
    
    this.clientEvent = clientEvent;
  }
  
  @Override
  protected void onReceive(BluetoothDevice device, byte[] message)
  {
    this.clientEvent.onReceive(message);
  }
  
  @Override
  protected void onDisconnect(BluetoothDevice device)
  {
    this.clientEvent.onDisconnect();
  }
}




Java Source Code List

com.mauriciotogneri.bluetooth.beacons.BeaconFilter.java
com.mauriciotogneri.bluetooth.beacons.BeaconListener.java
com.mauriciotogneri.bluetooth.beacons.BeaconManager.java
com.mauriciotogneri.bluetooth.beacons.BeaconService.java
com.mauriciotogneri.bluetooth.beacons.Beacon.java
com.mauriciotogneri.bluetooth.beacons.UnsupportedBluetoothLeException.java
com.mauriciotogneri.bluetooth.connection.client.ClientConnection.java
com.mauriciotogneri.bluetooth.connection.client.ClientEvent.java
com.mauriciotogneri.bluetooth.connection.client.ClientLink.java
com.mauriciotogneri.bluetooth.connection.client.ClientThread.java
com.mauriciotogneri.bluetooth.connection.kernel.ConnectionThread.java
com.mauriciotogneri.bluetooth.connection.scan.DeviceScanner.java
com.mauriciotogneri.bluetooth.connection.scan.ScannerManager.java
com.mauriciotogneri.bluetooth.connection.server.ServerConnection.java
com.mauriciotogneri.bluetooth.connection.server.ServerEvent.java
com.mauriciotogneri.bluetooth.connection.server.ServerLink.java
com.mauriciotogneri.bluetooth.connection.server.ServerThread.java