[zeromq-dev] zeromq for android
ashwini ramamurthy
ashwini.ram21 at gmail.com
Thu Jun 13 22:09:43 CEST 2013
Hi,
Thanks for your response. I did write a sample application but i feel like
i have missed out something as i have many errors.
I followed the steps to make the .so file and jar file given in
http://www.zeromq.org/build:android.
So now i have the .so file and jar file and have places it in the
appropriate folder.
Then i made the jni folder in my android application and created a make
file.
I am getting a libc Fatal Signal 11(SIGSEGV) error .
Do i have to include the src files in the folder in jni?
Did I miss out something? I would appreciate any suggestions or help.
Thanks in advance
-Ashwini
On Thu, Jun 13, 2013 at 2:25 PM, Yu Dongmin <miniway at gmail.com> wrote:
> Hi,
>
> At a AsyncTask subclass, you could do as the followings. But please keep
> in mind that I'm not a Android developer so I'm sure the doInBackground is
> the best place to create zeromq context.
>
> This is an example which create a worker thread then the worker thread
> communicate outside as a pure ZMQ application and communicate with Android
> through a pipe.
>
> If your requirement is simple, you could do your stuff without creating
> new thread as many other examples in the ZMQ guide.
>
> @Override
> protected Integer doInBackground (String... args)
> {
> ZContext ctx = new ZContext ();
> ctx.setLinger (100);
>
>
> Socket pipe = ZThread.fork (ctx, new Worker(), args[0]);
> Poller poller = ctx.getContext ().poller ();
> poller.register (pipe, Poller.POLLIN);
>
>
> while (!Thread.currentThread ().isInterrupted ()) {
>
>
> if (poller.poll (1000) < 0)
> break;
> if (poller.pollin (0)) {
> String message = pipe.recvStr ();
> publishProgress (message);
> }
> pipe.send ("HELLO");
> }
>
>
> ctx.destroy ();
>
> return null;
> }
>
>
> Thanks
> Min
>
> On Jun 13, 2013, at 11:12 PM, ashwini ramamurthy <ashwini.ram21 at gmail.com>
> wrote:
>
>
> Hi,
>
> Thanks for the quick response. Is there any example android application
> using jeromq I could refer ?
>
> Thanks,
> Ashwini
> On Thu, Jun 13, 2013 at 4:02 AM, Pieter Hintjens <ph at imatix.com> wrote:
>
>> You may find that JeroMQ is easier to use on Android.
>>
>> -Pieter
>>
>> On Wed, Jun 12, 2013 at 6:14 PM, ashwini ramamurthy
>> <ashwini.ram21 at gmail.com> wrote:
>> > Hi,
>> >
>> > I want to use ZeroMQ in my android application. I have built ZeroMQ
>> along
>> > with JZMQ and its JAR. I wanted to run a simple client server
>> application in
>> > android with zeromq. Is there any example I could refer to?
>> >
>> >
>> > Thanks in advance
>> >
>> >
>> >
>> > _______________________________________________
>> > zeromq-dev mailing list
>> > zeromq-dev at lists.zeromq.org
>> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>> >
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130613/bbeb0b13/attachment.htm>
More information about the zeromq-dev
mailing list