I have a question about the limitations of what you can do in native code on the Android platform.
Basically I have developed a library in native C code that uses UDP so
You still need your application to have permissions. For example, your native sockets will not work without android.permission.INTERNET
in the manifest.
...
Another option is to create the socket at the Java layer and pass it down. Here's an example of interacting with the socket in native land, see the method org_..._OpenSSLSocketImpl_connect()
:
http://www.netmite.com/android/mydroid/dalvik/libcore/x-net/src/main/native/org_apache_harmony_xnet_provider_jsse_OpenSSLSocketImpl.cpp