app/src/main/java/com/shoaibsaikat/ble/ServerActivity.java
//Stop ble advertising and clean up
Stop ble advertising and clean up
Stop ble advertising and clean up
public void stopAdvertise() {
        if (!isAdvertising)
            return;
        mBluetoothLeAdvertiser.stopAdvertising(advertiseCallback);
        if (mGattServer != null) {
            mGattServer.clearServices();
            mGattServer.close();
        }
        if (mAdvertisingServices != null)
            mAdvertisingServices.clear();
        isAdvertising = false;
    }
public void stopAdvertise ( ) { if ( ! isAdvertising ) return ; mBluetoothLeAdvertiser . stopAdvertising ( advertiseCallback ) ; if ( mGattServer != null ) { mGattServer . clearServices ( ) ; mGattServer . close ( ) ; } if ( mAdvertisingServices != null ) mAdvertisingServices . clear ( ) ; isAdvertising = false ; }
Stop ble advertising and clean up
Stop ble advertising and clean up