android-ndk

socket problem in Android

H! I have source in C, which is use the socket(AF_INET, SOCK_STREAM, 0); C method. I use the NDK and make the jni. Everything is fine, but the application don't work correctly; The original C method return 5 in the console. In Android that value is -1. I try to add the C source file the #include < socket.h>, but this is not the solutio...

How to open camera using Android NDK

Hi, I need to open camera from NDK to enhance the performances and I have search several days in internet. But nothing get help. Does anyone know how to open the camera using NDK? ...

What is the correct way to write native method signatures in Android NDK?

I have a working implementation of NDK library and corresponding Java-class. But I am not able to add overloaded method to that class. Currently my class contains: package com.package; public class MyClass { public static native String getFileName(); static { System.loadLibrary("mylib"); } } My jniwrappers.cpp file has th...

connect() C method in Android

H! I have source in C, which is use the connect(peer->fd, (struct sockaddr *)dst->sockaddr, sizeof(struct sockaddr_in)); C method. I use the NDK and make the jni. My application is a msrp modul, which contain a server and a client. This method is part of the client. The source fragment: /* We're going to be the client, connect to the...

Android NDK with Visual Studio

Hey All! I'd like to build some native libraries for android using the NDK (native development kit), but i'd like to use Visual Studio 2010 to do it. I've googled quite a bit but haven't found any information on it. Does anyone have any experience with this and know the steps necessary to make this happen? I have CYGWin installed, made...

Best method for text parsing androidK

Hello, I am trying to write a program in android that does a lot of string and xml parsing. I need suggestion of which way to go : Use JNI and implement parsing in C++ and use C++ xml SAX parsing (Android - NDk) Go with java and parse xml with SAX ...

Android NDK superuser permissions

Hi, I have a C program which I can run my rooted Android phone. However, in order to work correctly, the program must be run as superuser. I now wish to call a method from this program using the Android NDK interface. What must I do to have the native code run as superuser? ...