On Dec 6, 12:31 am, Nand <[email protected]> wrote:

> I have created an application that uses some native library(developed
> by me istelf). I have created the JNI layer for using the native
> methods and devleoped the application completely. But now we are
> facing the issue of 512 local reference issue as in the link below.
>
> http://markmail.org/message/7aveklghw6fuwtzd#query:512%20local%20entr...
>
> We are not able to solve this issue even after deleting the local
> references created in JNI layer. So we decided to use socket
> connection

I am sure you can solve this by better informed use of jni to avoid
the creation of local references in your native code.  If you can
implement it with sockets, you can implement it with jni functions
that pass buffers of raw bytes.

> between Appication layer(UI - to be as server) and the
> native layer( to be as client that connects to UI server socket)
> bypassing the JNI layer. But to initiate connection at the client
> side, we need loacl IP address( for example localhost, but android
> does not understand localhost concept i guess). And we dont want to
> use IP address of the network it is connected to(for example Wifi -
> IPaddress).

localhost is 127.0.0.1 - but this will require internet permission

You'd do better to use a unix domain socket instead, and avoid both
the addressing and permission issues

Pipes would be another option.

Are you going to package and start your code as a thread in a jni
library?  Doing it as an stand alone executable is possible at present
but officially discouraged.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to