While looking at all examples all I see is to initialize BluetoothGatt object the way used is
mGatt = device.connectGatt(activity, false, gattClientCallback);
Now how do I initialize the gatt object without connecting the device. I have a centralized call back class to handle callbacks for device connection , characteristic discovery and other things. But my problem is if I pass mgatt object to the constructor of that class it will go as empty object. I can always use
@Override
public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) {
super.onConnectionStateChange(gatt, status, newState);
try {
// Log.d("+++++++++++++connectionstatechange", "" + status);
mBluetoothGatt = gatt;
but is there a way I can initialize it without calling connect function.
Thanks much :)