Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

328
Vistas
How to stop monitorCharacteristic in React native ble-pplx

I'm having trouble with the monitorCharacteristicForService function in react-native-ble-plx. I want to stop the monitoring, but I don't seem to get it. Here is my code :

const getNumberOfTrames = async(device)=>{
    await device.writeCharacteristicWithResponseForService(serviceUUID, writeUUID, 'IzA5') 
    
    const monitorNumber = device.monitorCharacteristicForService(serviceUUID, readUUID, (error, a) => {

      if (error) {
        console.log('err',error)
        console.log('err',error.message)
      } else {
        console.log(base64.decode(a.value))
      }
    }, 'idMonitorNumber')

    return () => {
      console.log('REMOVED')
      monitorNumber.remove();
    }
  }

REMOVED is never printed on my console, even when I deconnect my bluetooth... I also tried with bleManager.cancelTransaction('idMonitorNumber') but it doesn't do anything either.

For information, I just call my function getNumberOfTrameswhen I press a button, but I have no other interaction with it. Maybe I need to say somewhere 'call the return function of getNumberOfTrames' ?

Can someone help me please ?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda