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

No devices appear #1

Open
alex-96-eng opened this issue May 7, 2023 · 0 comments
Open

No devices appear #1

alex-96-eng opened this issue May 7, 2023 · 0 comments

Comments

@alex-96-eng
Copy link

alex-96-eng commented May 7, 2023

I have android studios set up and two devices running the app (Pixel XL API 33 & Pixel 3a XL API 33). They are both connected to bluetooth, but I am unable to get one device to see the other. If I put a breakpoint on the code and try to list devices, the code breaks here:

https://github.com/halilozel1903/AndroidBluetoothChatApp/blob/master/app/src/main/java/com/halil/ozel/bluetoothchatapp/MainActivity.java#L120

Then if I step over it just exits, so I am assuming I don't have those permissions. Therefore, I added an else clause with this:

ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.BLUETOOTH_CONNECT}, 1);

And now the code goes into the main logical block, but there are no devices found. If I manually pair the devices via the Bluetooth settings on each phone then the device shows.

However, even then, when I try to connect, its just hangs in the state of "connecting..." :(

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

1 participant