libplctag / libplctag4android

An experimental repo with an example Android application using libplctag.
Mozilla Public License 2.0
2 stars 2 forks source link

Xamarin Support #6

Closed timyhac closed 3 years ago

timyhac commented 3 years ago

Hi team - I wasn't sure the best place to put this commentary.

I've done a proof of concept Xamarin.Forms / Android application.

This is running on my Pixel 3a, the Run button goes and fetches the value of a DINT and puts it in the textbox. The value stored in the PLC happened to be 1234. It essentially runs this code. Screenshot_20210225-091121

More importantly however, the libplctag native library was built using Github actions, see the work in progress here: https://github.com/timyhac/libplctag/blob/release/.github/workflows/ci.yml No modifications were required to the CMakeFile.

Relevant information:

kyle-github commented 3 years ago

Cool! If you look over at libplctag4j, it also builds Android AAR files with the native binaries embedded. It is done through the CI. It is quite out of date right now and I need to pull out all the Bintray integration because JFrog decided to shut down bintray.com.

timyhac commented 3 years ago

Very neat! The cmake params I had were pretty close to those in the aar file, thanks for the heads up!

I dont' understand java/gradle, but I couldn't see how, after the libplctag library is produced, it is embedded into the aar file - perhaps this bit?

Do you feel that there is a place for android builds in the core project releases?

It could be used for both the java and .NET wrappers I guess.

timyhac commented 3 years ago

If you're interested and feel there is a place for it, there is a proof of concept here: https://github.com/timyhac/libplctagAndroidBuilds

I wouldn't feel comfortable packaging up any "unofficial" builds into the libplctag.NET wrapper, so I won't use this except for my own purposes and further exploring compatibility with android.

timyhac commented 3 years ago

This can be closed as the ARM builds cover the use case.