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

.NET.Bluetooth/.NET.sockets BluetoothClient throws error on Android 13 #383

Open
VervaekeSofie opened this issue Dec 26, 2023 · 5 comments
Labels

Comments

@VervaekeSofie
Copy link

Hi,
I used InTheHand.Net.Bluetooth in a MAUI app and everything works on a old tablet with Android 8.1.
I tried it now on a new tablet with Android 13 and the app is interrupt on this code: BluetoothClient client = new BluetoothClient();

All permissions for bluetooth are on and also ACCESS_FINE_LOCATION.

What do i have to change, so this works also on android 13?

@peterfoot
Copy link
Member

Are you requesting permission at runtime e.g. https://inthehand.com/2023/10/11/asking-for-permission/

@VervaekeSofie
Copy link
Author

Thank you, this was the solution!

@VervaekeSofie
Copy link
Author

VervaekeSofie commented Dec 29, 2023

I redeployed my app to my tablet and now I can't access it, even with the permissions. I have to manually (through my app's settings) grant access to "nearby devices" on .
And all Permissions are enabled, what am I overlooking?

@Salim-Farran
Copy link

Hi, did you find a solution for this issue ? I'm having the same issue with my app in release but on android 11, I'm getting the following exception on the code ( BluetoothClient client = new BluetoothClient() ): System.TypeInitializationException: The type initializer for 'InTheHand.Net.Bluetooth.AndroidBluetoothRadio' threw an exception. In debug everything works fine.
All permissions are enabled also.

Thank you.

@peterfoot
Copy link
Member

What are your linker settings? Can you exclude InTheHand.Net.Bluetooth from linking?

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

No branches or pull requests

3 participants