-2

There is this pure java implementation: https://github.com/eclipse/milo of an UPC-UA Client/Server. Now I guess it shouldn't be too hard to implement this for an android application.

So my current progress is an empty android project, where I try to import the OPC Java-sdk. But since this isn't a JAR file, I can't import it properly...

TobiasW
  • 861
  • 3
  • 13
  • 36

2 Answers2

3

Currently the artifact is only available from the Sonatype OSS snapshots repository because there are no releases yet.

fernandospr's answer is correct though, but you would need to either add the Sonatype OSS repository reference or clone the project and run mvn install.

Now for the unfortunate part: Milo is written in Java 8, so it's unlikely you're going to get it working on Android.

Kevin Herron
  • 6,500
  • 3
  • 26
  • 35
  • Is there another implementation of OPC-UA which works for android? – TobiasW Aug 18 '16 at 05:41
  • 1
    Not a free or open source one. FWIW, Milo may work on Android Nougat once it's released. Hopefully I'll be able to test get my hands on a phone that can run Nougat and test. – Kevin Herron Aug 18 '16 at 14:17
  • I always forget the foundation open-sourced that. Yes, you could build something on top of it. It's just a stack though, and not a stack + SDK, so you'd have a lot of working ahead of you just implementing all the application layer details of a client or server. – Kevin Herron Aug 20 '16 at 13:56
  • @TobiasW Yes the OPC Foundation stack works on Android - as do the commercial https://www.prosysopc.com/products/opc-ua-java-sdk/ and the free https://www.prosysopc.com/products/opc-ua-client-for-android/ (application) that are built on top of that. As Kevin mentions, though, working on the plain stack is demanding, but of course possible, if you want to limit yourself to OSS. – Jouni Aro Aug 30 '16 at 10:46
  • Did it get tested in Nougat yet? – ctrlalt313373 Oct 05 '17 at 13:50
2

You can try using your maven dependency adding the following to your build.gradle file:

buildscript section:

buildscript {
    repositories {
        mavenCentral()
...

dependencies section:

dependencies {
    ...
    compile "your-dependency:version"
    ...
}

For more info, see the Dependency Management Basics reference

fernandospr
  • 2,976
  • 2
  • 22
  • 43