Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RN bluetooth classic app is not working on Android 10 and above #8

Open
rahulp9538 opened this issue May 5, 2023 · 1 comment
Open

Comments

@rahulp9538
Copy link

rahulp9538 commented May 5, 2023

Hi,

i am trying to run RN bluetooth classic app on my Android (10) phone. But it gets struck when i click on Discover Devices button.

Below is the log:

2023-05-05 15:51:11.694 32070-32129/com.bluetoothclassicexample I/ReactNativeJS: Running application "BluetoothClassicExample" with appParams: {"rootTag":21}. __DEV__ === false, development-level warning are OFF, performance optimizations are ON

2023-05-05 15:51:11.723 32070-32070/com.bluetoothclassicexample D/RNBluetoothClassicModule: onHostResume: register Application receivers

2023-05-05 15:51:11.814 32070-32070/com.bluetoothclassicexample D/ViewRootImpl@e05321c[MainActivity]: MSG_RESIZED: frame=(0,0,1080,2340) ci=(0,85,0,126) vi=(0,85,0,126) or=1

2023-05-05 15:51:11.905 32070-32129/com.bluetoothclassicexample I/ReactNativeJS: DeviceListScreen::getBondedDevices
2023-05-05 15:51:11.907 32070-32129/com.bluetoothclassicexample I/ReactNativeJS: App::componentDidMount adding listeners: onBluetoothEnabled and onBluetoothDistabled

2023-05-05 15:51:11.907 32070-32129/com.bluetoothclassicexample I/ReactNativeJS: App::componentDidMount alternatively could use onStateChanged
2023-05-05 15:51:11.914 32070-32129/com.bluetoothclassicexample I/ReactNativeJS: App::componentDidMount Checking bluetooth status

2023-05-05 15:51:11.920 32070-32070/com.bluetoothclassicexample D/ScrollView: initGoToTop
2023-05-05 15:51:11.985 32070-32130/com.bluetoothclassicexample D/RNBluetoothClassicModule: Adding listener to BLUETOOTH_ENABLED, currently have 1 listeners

2023-05-05 15:51:11.988 32070-32130/com.bluetoothclassicexample D/RNBluetoothClassicModule: Adding listener to BLUETOOTH_DISABLED, currently have 1 listeners
2023-05-05 15:51:12.018 32070-32129/com.bluetoothclassicexample I/ReactNativeJS: 'DeviceListScreen::getBondedDevices found', [ { _bluetoothModule: 
         { _nativeModule: 
            { accept: { [Function] type: 'promise' },
              addListener: { [Function] type: 'async' },
              availableFromDevice: { [Function] type: 'promise' },
              cancelAccept: { [Function] type: 'promise' },
              cancelDiscovery: { [Function] type: 'promise' },
              clearFromDevice: { [Function] type: 'promise' },
              connectToDevice: { [Function] type: 'promise' },
              disconnectFromDevice: { [Function] type: 'promise' },
              getBondedDevices: { [Function] type: 'promise' },
              getConnectedDevice: { [Function] type: 'promise' },
              getConnectedDevices: { [Function] type: 'promise' },
              isBluetoothAvailable: { [Function] type: 'promise' },
              isBluetoothEnabled: { [Function] type: 'promise' },
              isDeviceConnected: { [Function] type: 'promise' },
              openBluetoothSettings: { [Function] type: 'async' },
              pairDevice: { [Function] type: 'promise' },
              readFromDevice: { [Function] type: 'promise' },
              removeAllListeners: { [Function] type: 'async' },
              removeListener: { [Function] type: 'async' },
              requestBluetoothEnabled: { [Function] type: 'promise' },
              setBluetoothAdapterName: { [Function] type: 'promise' },
              startDiscovery: { [Function] type: 'promise' },
              unpairDevice: { [Function] type: 'promise' },
              writeToDevice: { [Function] type: 'promise' },
              getConstants: [Function] },
           _eventEmitter: 
            { _subscriber: 
               { _subscriptionsForType: 
                  { didUpdateDimensions: 
                     [ { subscriber: [Circular],
                         emitter: 
                          { _subscriber: [Circular],
                            sharedSubscriber: [Circular],
                            _currentSubscription: null },
                         listener: [Function],
                         context: undefined,
                         eventType: 'didUpdateDimensions',
                         key: 0 } ],
                    hardwareBackPress: 
                     [ { subscriber: [Circular],
                         emitter: 
                          { _subscriber: [Circular],
                            sharedSubscriber: [Circular],
                            _currentSubscription: null },
                         listener: [Function],
                         context: undefined,
                         eventType: 'hardwareBackPress',
                         key: 0 } ],
                    collectBugExtraData: 
                     [ { subscriber: [Circular],
                         emitter: 
                          { _subscriber: [Circular],
                            sharedSubscriber: [Circular],
                            _currentSubscription: null },
                         listener: [Function: value],
                         context: null,
                         eventType: 'collectBugExtraData',
                         key: 0 } ],
                    collectRedBoxExtraData: 
                     [ { subscriber: [Circular],
                         emitter: 
                          { _subscriber: [Circular],
                            sharedSubscriber: [Circular],
                            _currentSubscription: null },
                         listener: [Function: value],
                         context: null,
                         eventType: 'collectRedBoxExtraData',
                         key: 0 } ],
                    keyboardWillShow: 
                     [ ,
                       ,
                       { subscriber: [Circular],
                         emitter: 
                          { _subscriber: [Circular],
                            dismiss: [Function],
                            scheduleLayoutAnimation: [Function] },
                         listener: [Function: bound scrollResponderKeyboardWillShow],
                         context: undefined,
                         eventType: 'keyboardWillShow',
                         key: 2 } ],
                    keyboardWillHide: 
                     [ ,
                       ,
                       { subscriber: [Ci

2023-05-05 15:51:15.187 32070-32130/com.bluetoothclassicexample D/BluetoothAdapter: startDiscovery
@kenjdavidson
Copy link
Owner

There isn't much in this log that is helpful, it looks like it stops right after the startDiscovery request? There are no more logs? No errors? The app just sits there and does nothing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants