dotintent / react-native-ble-plx

React Native BLE library
Apache License 2.0
3.07k stars 513 forks source link

Read Notification Data, Service #359

Closed ALAxHxC closed 5 years ago

ALAxHxC commented 6 years ago

Hi people, Im trying to get data of pulse oximeter device, Already connect and identify the device but, when y trying to set service and characteristics with those function:

  leer_datos_de_notificacion(device){
    device.monitorCharacteristicForService(
      "cdeacb80-5235-4c07-8846-93a37ee6b86d",
      "cdeacb81-5235-4c07-8846-93a37ee6b86d",
      (error, data) => {
        if (error){
          console.log("Error pidiendo datos",error);
          return;
        }
        console.log("Data de notifiacacion",data)
      },
    ).subscribe((data)=>{
      console.log("Resultado ",data)
    })
  }

The app crash with message:

undefined its not a funcion

. screenshot_2018-11-05-11-47-51 1

Can you helpme?

Cierpliwy commented 6 years ago

I think you should provide more information:

Cierpliwy commented 5 years ago

Closing due to inactivity. Please reopen if needed.

Dhiraj2996 commented 5 years ago

getting the same error. Were you able to resolve it?

dariuszseweryn commented 5 years ago

Correct me if I am wrong but Subscription has only a method .remove(), not .subscribe()