Hi,
My changes already include a working SimpleClient/SimpleServer working with
Java Bindings, you should be able to compile them by running
./auto_build.sh linux_unsecured_with_java
on the latest patch in the change. To run the simpleclient you will need to run
these commands in the root iotivity folder, assuming you have not changed the
output folder:
export LD_LIBRARY_PATH=$(pwd)/out/linux/x86_64/debug/:$LD_LIBRARY_PATH
java -cp
java/examples-java/simpleclient/build/libs/simpleclient.jar:java/iotivity-linux/build/libs/iotivity-linux.jar
org.iotivity.base.examples.SimpleClient
What I could use help with is removing the dependency on Android from the other
examples in java/examples-java.
Petre Eftime
On Wed, 2016-05-04 at 15:26 +0800, Maxi Wu wrote:
Eftime,
Thank you. Glad to have any help with Java API.
I am trying to work on a client application to make request to iotivity cloud
server or iotivity resource.
There is already C/C++ library running on Linux, I am thinking wrapping it with
JNI will enable Generic Java development, that is what you are working on, it
that right?
I will take a look at your changes and see if I could create a simpleclient
with it.
One more thing, wiki has a Iotivity Simulator which run on Eclipse. It is a
Java wrapper on simulator core.
I am wondering what this simulator core actually do. Will I able to import this
library and use it to communicate with a genuine iotivity server?
Or maybe I could try to understand what CoAP message it sends out and develop a
generic CoAP client to talk to iotivity server? If the CoAP and application
layer protocol of Iotivity is not going to have a drastic change, implementing
a generic Java CoAP client could be a viable solution.
From: Eftime, Petre P [mailto:[email protected]]
Sent: Wednesday, April 27, 2016 8:07 PM
To: uzchoi at samsung.com; 'Maxi Wu'; iotivity-dev at lists.iotivity.org
Subject: RE: [dev] Is it possible to port the Java(Android) API to general java
application?
Hi Maxi,
I am currently on getting Java API working on Linux, but review and testing
might take a while since it?s a major change in how the Java API is being built
for Android as well. For now transport is only IP, no BLE.
You can find my changes here: https://gerrit.iotivity.org/gerrit/#/c/7895/, and
you should be able to build and run the simpleclient and simpleserver examples,
or your project as well. The API documentation should be very similar to the
Android one, minus Activity or Context.
However, keep in mind that some things might change and not everything has been
tested thoroughly, and there?s no official documentation for how to build and
run a program right now, although I can offer you help here, if you need any.
--
Petre Eftime
From: iotivity-dev-bounces at lists.iotivity.org<mailto:iotivity-dev-bounces at
lists.iotivity.org> [mailto:[email protected]] On Behalf
Of ???(Uze Choi)
Sent: Wednesday, April 27, 2016 12:14 PM
To: 'Maxi Wu' <maxi.wu at u-media.com.tw<mailto:maxi.wu at u-media.com.tw>>;
iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at lists.iotivity.org>
Subject: Re: [dev] Is it possible to port the Java(Android) API to general java
application?
Hi Maxi,
Please check the Eftime, Petre P mail with Title as ?Re: [dev] Generic Java
Bindings Feature?
Visit
https://gerrit.iotivity.org/gerrit/gitweb?p=iotivity.git;a=shortlog;h=refs/heads/generic-java
BR, Uze Choi
From: iotivity-dev-bounces at lists.iotivity.org<mailto:iotivity-dev-bounces at
lists.iotivity.org> [mailto:[email protected]] On Behalf
Of Maxi Wu
Sent: Wednesday, April 27, 2016 5:36 PM
To: iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at
lists.iotivity.org>
Subject: [dev] Is it possible to port the Java(Android) API to general java
application?
Hi,
Java is cross-platform, but JNI uses native library. Is it possible to use this
Android API like normal JAVA application?
If not, How to create a Java client? Do we need to interact with iotivity cloud
using CoAP?