java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.bluetooth.BluetoothGatt.discoverServices()' on a null object reference

Stack Overflow | dipali pawar | 10 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    BluetoothGatt not discoverservices() onConnectionStateChange in android

    Stack Overflow | 10 months ago | dipali pawar
    java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.bluetooth.BluetoothGatt.discoverServices()' on a null object reference

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'boolean android.bluetooth.BluetoothGatt.discoverServices()' on a null object reference

      at com.actofit.wear.Home.LifeLogStopService$1.onConnectionStateChange()
    2. com.actofit.wear
      LifeLogStopService$1.onConnectionStateChange
      1. com.actofit.wear.Home.LifeLogStopService$1.onConnectionStateChange(LifeLogStopService.java:103)
      1 frame
    3. Android Platform
      Binder.execTransact
      1. android.bluetooth.BluetoothGatt$1.onClientConnectionState(BluetoothGatt.java:181)
      2. android.bluetooth.IBluetoothGattCallback$Stub.onTransact(IBluetoothGattCallback.java:70)
      3. android.os.Binder.execTransact(Binder.java:453)
      3 frames