I was able to get the basic test working as well, but not receiving messages.

In Activity.onCreate:

node = new Zyre("test");
node.start();
node.join("testgroup");

In a button onClickHandler:

node.shouts("testgroup", "I am testing");

This works perfectly, using Pyre I can read the shouted messages every
time I click the button. But then if I try to receive a message on the
Android side....

Zmsg received = node.recv();

W/linker  ( 5477): libzyrejni.so: unused DT entry: type 0x1d arg 0x973
W/linker  ( 5477): libzyre.so: unused DT entry: type 0x1d arg 0xf11
W/linker  ( 5477): libzmq.so: unused DT entry: type 0x1d arg 0xabbc
W/linker  ( 5477): libczmq.so: unused DT entry: type 0x1d arg 0x3f23
E/AndroidRuntime( 5477): FATAL EXCEPTION: Thread-16802
E/AndroidRuntime( 5477): Process: com.sprobertson.ZyreTest, PID: 5477
E/AndroidRuntime( 5477): java.lang.UnsatisfiedLinkError:
dalvik.system.PathClassLoader[DexPathList[[zip file
"/data/app/com.sprobertson.ZyreTest-1/base.apk"],nativeLibraryDirectories=[/data/app/com.sprobertson.ZyreTest-1/lib/arm,
/vendor/lib, /system/lib]]] couldn't find "libczmqjni.so"
E/AndroidRuntime( 5477):        at
java.lang.Runtime.loadLibrary(Runtime.java:366)
E/AndroidRuntime( 5477):        at java.lang.System.loadLibrary(System.java:988)
E/AndroidRuntime( 5477):        at org.zeromq.czmq.Zmsg.<clinit>(Zmsg.java:12)
E/AndroidRuntime( 5477):        at org.zeromq.zyre.Zyre.recv(Zyre.java:173)
E/AndroidRuntime( 5477):        at
com.sprobertson.ZyreTest.MainActivity$2.run(MainActivity.java:74)
W/ActivityManager( 1039):   Force finishing activity 1
com.sprobertson.ZyreTest/.MainActivity

Looks like it needs another .so included, "libczmqjni.so"?

On Thu, Jan 7, 2016 at 8:48 AM, Pieter Hintjens <[email protected]> wrote:
> Yes, this API has gossip. The API matches the Zyre C API (it's
> generated automatically from it).
>
> On Thu, Jan 7, 2016 at 5:43 PM, Utsav Drolia <[email protected]> wrote:
>> Is the API the same as Jyre?
>> From what I understand, Jyre did not have gossip when I started using it.
>> Does this Android version of Zyre have it?
>>
>> On Jan 7, 2016, at 11:22 AM, Utsav Drolia <[email protected]> wrote:
>>
>> I developed some apps for my research using Jyre on Android. I can test
>> those with Zyre and report results.
>>
>> On Jan 7, 2016 11:15 AM, "Pieter Hintjens" <[email protected]> wrote:
>>>
>>> Next is to make a useful app; https://github.com/codejockey/canvas is
>>> the one we're playing with, collaborative drawing.
>>>
>>> On Thu, Jan 7, 2016 at 3:19 PM, Arnaud Loonstra <[email protected]>
>>> wrote:
>>> > On 2016-01-07 14:57, Pieter Hintjens wrote:
>>> >> OK, so thanks to everyone for helping. The problem was due to how
>>> >> Android looks for shared libraries; if the root .so needs to specify
>>> >> its dependencies properly. This means adding a
>>> >> target_link_libraries()
>>> >> in the Cmake script.
>>> >>
>>> >> I've gotten Zyre to run on Android now; if anyone wants it, the jar
>>> >> file is on https://github.com/zeromq/zyre/releases/tag/v1.1.0 and the
>>> >> scripts are in zyre/master.
>>> >>
>>> >
>>> > Ow yeah, running a Zyre test on my mobile as we speak :)
>>> >
>>> > Great!
>>> >
>>> > Arnaud.
>>> > _______________________________________________
>>> > zeromq-dev mailing list
>>> > [email protected]
>>> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>> _______________________________________________
>>> zeromq-dev mailing list
>>> [email protected]
>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>>
>>
>> _______________________________________________
>> zeromq-dev mailing list
>> [email protected]
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
> _______________________________________________
> zeromq-dev mailing list
> [email protected]
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to