I following the page Bluetooth Low Energy for developing in Android 4.3 for Bluetooth Low Energy .
I already can turn on the Bluetooth
This problem is very tricky to solve but seems to have to do with some sort of race condition in the android bluetooth stack. Doug's answer of catching Exception e and then checking if its a dead object did not work when I tried. I did notice that when I call
bluetoothGatt.connect()
a return value of false can indicate a dead object exception.