Skip to content

Instantly share code, notes, and snippets.

View dglozano's full-sized avatar

Diego Garcia Lozano dglozano

View GitHub Profile
public class Event<T> {
private boolean hasBeenHandled;
private T content;
public Event(T content) {
this.content = content;
this.hasBeenHandled = false;
}
@dglozano
dglozano / BondingHelper.java
Created November 22, 2018 06:04
BondHelper class for BLE Devices with encrypted characteristics
import android.bluetooth.BluetoothDevice;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import com.polidea.rxandroidble2.RxBleDevice;
import java.lang.reflect.Method;
import java.util.concurrent.TimeUnit;