sharpbrick / powered-up

.NET implementation of the LEGO PoweredUp Protocol
MIT License
98 stars 19 forks source link

Xamarin Bluetooth Stack (and Adjustment) #146

Closed Berdsen closed 3 years ago

Berdsen commented 3 years ago

This will fix #69 As currently mentioned, you should take a look at the last commit. All the language features remain for the PoweredUp library but the target framework changed. Perhaps it might be enough for now and can be reworked later with .NET 6 which hopefully brings Desktop and Mobile together on the same base.

Furthermore I just could test it with Android for now. iOS might be a little bit harder, because it might be tricky to get the BT adress of the requested device. I'm currently checking on how I can test a iOS application to check if it will work.

A maintenance release might be a good option. But the other options will not be necessary duplicate implementations but just a different csproj file of the lib, reflecting the changes made in the last commit. And then two different sln files for each type of project. The rest could remain.

tthiery commented 3 years ago

First Pass over it

Berdsen commented 3 years ago

I added multi-targets for NET5 and NETSTANDARD21. Looks good so far. Would you create a repository for the app then? I would create a corresponding PR then into it, after extracting the app. I would also adjust the app package to be org.sharpbrick.poweredup then. Happy to discuss the extraction of the examples in #149 then

tthiery commented 3 years ago

I added the repo. Copy your two or three examples meanwhile. I will work another day on proper permissions.

tthiery commented 3 years ago

@Berdsen Tell me when you are ready for review here

tthiery commented 3 years ago

We will go the multi-targeting route if nothing crashes.

Berdsen commented 3 years ago

So I extracted the Xamarin app tested the Xamarin implementation with locally build nugets. At least for my "Vernie" the examples work :) And also the CLI and .NET Example App work. So I would go for the multi-targeting 👍