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

Add Bluetooth functionality #363

Merged
merged 8 commits into from
Mar 15, 2023
Merged

Conversation

KamaleiZestri
Copy link
Contributor

Per issue #325, here is bluetooth functionality.

It should work with any bluetooth receiver that shares it's UUID of 8a8478c9-2ca8-404b-a0de-101f34ab71ae

@markusfisch markusfisch merged commit 06df0c4 into markusfisch:master Mar 15, 2023
@markusfisch
Copy link
Owner

Great! 👍 Thanks a lot!

@DienoX
Copy link

DienoX commented Mar 28, 2023

Unfortunately, when I enable this function, the application closes.

Android 13, Samsung Galaxy S20

@markusfisch
Copy link
Owner

May I ask what version you are using? 1.60.0 or 1.60.1?

@DienoX
Copy link

DienoX commented Mar 28, 2023

1.60.1
The update was from the Google Play Store.
SmartSelect_20230328_120453_Settings

@markusfisch
Copy link
Owner

Does it close when you enable the option in settings or when you're scanning with it?

@DienoX
Copy link

DienoX commented Mar 28, 2023

After enabling the feature and selecting the host everything works. The application closes after scanning the code.

@KamaleiZestri
Copy link
Contributor Author

Not sure if it is related, but I have noticed that it crashes when attempting to connect to a host that is not running a server. Was planning to look more into it further in the week.

@DienoX
Copy link

DienoX commented Mar 28, 2023

You're probably right. The server was not running. I thought it was HID Bluetooth implementation.
I thought it works similar to this app https://play.google.com/store/apps/details?id=io.appground.blek

Is this the server for this application?
https://github.com/KamaleiZestri/BinaryReceptor

@KamaleiZestri
Copy link
Contributor Author

Yes, that is the one I made and use, but really anything will work as long as it uses BinaryEye's UUID.

@markusfisch
Copy link
Owner

Hm, it's still strange that the app is crashing when the server isn't running because all corresponding exceptions seem to be catched already 🤔

Unfortunately, I don't have a Bluetooth device to test this, and can't run BinaryReceptor (because I'm not running Windows 🙈), so I would really appreciate any help.

@KamaleiZestri
Copy link
Contributor Author

You're probably right. The server was not running. I thought it was HID Bluetooth implementation. I thought it works similar to this app https://play.google.com/store/apps/details?id=io.appground.blek

Is this the server for this application? https://github.com/KamaleiZestri/BinaryReceptor

The reason this is not an HID implementation is because I didn't even consider it. 🙃
I was too focused on implementing a conversion of HTTP/TCP connection to even consider bluetooth's unique capabilities.

I am unsure how to implement HID profile, but a cursory look shows minSDK at 28. https://developer.android.com/reference/kotlin/android/bluetooth/BluetoothHidDevice

Which coincides with the app you mentioned requiring Android 9. BinaryEye's minSDK is much lower (14 i think) so HID profile(and no bluetooth server software) will not be possible for quite a while.

@DienoX
Copy link

DienoX commented Mar 29, 2023

It seems to me that @markusfisch will not want to raise the minimum API level. I once talked in another topic that concerned the API level.

@markusfisch
Copy link
Owner

I will raise the minimum API level at some point later this year, just not now 😉 And not all the way to 28, which really isn't necessary because we can always check the API level at run time and use BluetoothHidDevice only from 28 on.

I want to have a good reason to leave people behind.

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

Successfully merging this pull request may close these issues.

3 participants