EngstromJimmy / Blazm.Bluetooth

85 stars 14 forks source link

Porting to dotnet standard 2.0 #17

Closed asheesh1996 closed 2 years ago

asheesh1996 commented 2 years ago

Can we port it to dotnet standard 2.0?

EngstromJimmy commented 2 years ago

Why do we want to? (Just trying to understand the use case)

asheesh1996 commented 2 years ago

Why do we want to? (Just trying to understand the use case)

I want to use this package in unity, and it only supports netstandard 2.0

EngstromJimmy commented 2 years ago

I haven't looked much at the interop in Unity but I am not sure that would work. Blazm uses JavaScript from Blazor to run and that wouldn't be available in Unity. I'll close this issue, for now, I don't think making a netstandard version of this library would solve the problem. Please try it out and if it works I'd be happy to revisit this suggestion.

asheesh1996 commented 2 years ago

Hi @EngstromJimmy, I wanted to ask you if there is a way to use this library in a dotnet6 console application, I am trying to use Bluetooth for my dotnet console application.

EngstromJimmy commented 2 years ago

No, this library is for Blazor only, it uses Web APIs (only available from inside a WebBrowser) to communicate with Bluetooth. If you are using a .NET console app you should be able to use native APIs. I know UWP has APIs to connect to Bluetooth, not sure about console apps.