Can't see the bluetooth deviceClass #228
-
I am making a Bluetooth Chat Application in React Native. Everything is working as expected, I can communicate between devices, read data and write data etc. But now I want to acces the Bluetooth deviceclass, this property is always returning undefined for me. And I do not know why. I think it has something to do with the 'android.permission.BLUETOOTH_CONNECT'. Because when I created an Android project trying to get the deviceclass everything worked fine.
This code worked as expected but needs the 'android.permission.BLUETOOTH_CONNECT' permission in the AndroidManifest.xml So I check if the permission was granted in my React Native project using the following code.
Which returns false, meaning that is does not have the permission. So I assume it has something to do with this 'android.permission.BLUETOOTH_CONNECT' permission. But when I try to add this permission to my React Native project nothing seems to change. Even after rebuilding the app. Can someone help me with this problem? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Can you debug the android side and see if it's actually getting set? Device class is a hold over from the original library, not sure if it's ever worked. Not sure if I'll be able to do it soon. But I'll try to get to it if you can't. |
Beta Was this translation helpful? Give feedback.
-
Nice. Want to submit a pr? I'll release it when you do. |
Beta Was this translation helpful? Give feedback.
Can you debug the android side and see if it's actually getting set? Device class is a hold over from the original library, not sure if it's ever worked.
Not sure if I'll be able to do it soon. But I'll try to get to it if you can't.