Replies: 1 comment
-
The legacy one won't work in modern .NET. You should be able to do everything you need in v4. The Client property is for platforms which use System.Net.Sockets which Android does not. However you can get the Stream for the client and use that to read and write. Note also that most platforms buffer when you write to a stream so you will want to call Flush() (or FlushAsync()) to ensure it is sent to the device. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
i'm using 32feet.NET - Legacy (v3.x) version this libary to do a bluetooth controller in my .net maui project, the code run well on window but when i compile and run in on mobile, it always fail to initialize the BluetoothClient variable, throwing a vauge PlatformNotSupportedException with no description.
Here are the things that i have tried:
-add required android premission:
Additional infromation:
-here are the call stack that i've manage to get from the 32feet.NET - Legacy (v3.x) attemp:
-I the reason that is use the Legacy (v3.x) libary is because i was following this guide regarding sending and reciving data via bluetooth
-during my 32feet.NET - Legacy (v3.x) attemps i notice a warning regarding this libary in the androd dependency, i know that it might be the cause but i can't open and read the warning, so i instead tried to go to the nuget installation page but notice nothing usefull. I've also tried looking for any other warning in the other two latest libary but found no warning in the solution explorer dependencies.
-i've read more about other issue and discussion in this repository and found that issue #458 and #187 does have some similarity to the prolem i encounterd though the only similarity is the PlatformNotSupportedException and nothing else so im not sure that it would be applicable
-target environment:
-Finally the code i use, these three function are the all of the bluetooth related code in my project, and all of my attemp mentioned earlyer are done on these code with minimal changes:
That's everything that I've manage to know about this problem, since this is my first time using this libary and also my first time writing a coding question so the quality of this question might be poor so sorry for that in advance. Any help or suggestion would be extremely apreciated.
Beta Was this translation helpful? Give feedback.
All reactions