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

274
Vistas
null is not an object (evaluating 'this._nativeModule.isBluetoothEnabled') in react native

I've recently started to work on react native, I'm trying to integrate react-native-bluetooth-classic to my project. https://kenjdavidson.com/react-native-bluetooth-classic/api-overview/

However, I'm stuck on this error:

"TypeError: null is not an object (evaluating 'this._nativeModule.isBluetoothEnabled')

This error is located at: in Untitled (created by ExpoRoot) in ExpoRoot in RCTView (created by View) in View (created by AppContainer) in RCTView (created by View) in View (created by AppContainer) in AppContainer"

I have installed the component with

yarn add react-native-bluetooth-classic --save and

npx pod-install
The linking seems fine. I'm copying this example from the library https://github.com/kenjdavidson/react-native-bluetooth-classic-apps/blob/1cba89aaa1181998dbcab7a9549a88a9bb5071a1/BluetoothClassicExample/App.js#L57. However, is a class component and I would like use function component (so maybe it's that the problem) Inside my useeffect

  useEffect(() => {
  let enabled  = RNBluetoothClassic.isBluetoothEnabled();

My RNBluetoothClassic object is NULL and it gave me this error

TypeError: null is not an object (evaluating 'this._nativeModule.isBluetoothEnabled')

from my understanding it should have created it with the import

import RNBluetoothClassic, { BluetoothEventType } from 'react-native-bluetooth-classic'; So I think is a linkage problem or maybe I can't call a class component.

Someone has any idea? note at the moment I'm trying to test on android

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