android-ndk

Android NDK running native processes.

I want to run tcpdump on the NDK using Process.start() and want to capture this output to a buffer.Can anybody show me how i can do this?Also is the process created in the same Dalvik Vm as the JNI call or is it in a different VM? ...

Low level (voltage) access of headphone input in android

Is there an API in android to access the headphone hardware input? Ideally I'd like to be able to directly read the incoming voltage/current. Accessing this in either Java or the NDK would be fine. Preferably if there's a way to do this on non rooted phones. ...

how to run hello-exe in the Android emulator

Hi, I compiled the hello-exe sample, which is contained in the Android ndk. The problem is that I don't know how to run it on the emulator (I'm using the Windows emulator). Any ideas? Also, is there a way to telnet into the emulator, and run programs, like in a regular Linux terminal? thanks, Joan ...

User Java class in the Android NDK

I have Java class which initialized with data from file. The init process is slow. Is is possible to move this initialization to NDK level? Is it possible to create my user defined class in NDK and return it into SDK? ...

How to get the current time in native Android code?

Hello, I was wondering if there is an easy way to get the current time in native Android code. Optimally it would be something comparable to System.getTimeMillies(). I will only be using it to see how long certain function calls will take so a long variable with the current time in milliseconds would be the optimal solution for me. Tha...

How to call Java methods from C++ in JNI

So I'm writing an Android app which uses a large c++ library. I have everything working so that the java app can call the c++ delegation methods, but I'm finding myself wishing I could log messages from c++ to the Android log. This is easy from java, but I'm at a loss as to how to call a java method from c++. My searches found methods...

Opening a connection on Android and using it via the NDK

Hey all, this is briefly what im trying to do: Im making an Android application that uses C++ libraries compiled from the Android NDK. Some of these C++ libraries create connections and act as servers to report data over a wifi connect (i am not trying to use the phones 3g connection or anything similar). The connection will be created u...

Is the native AAC decoder available when using Android NDK?

I'm looking for a way to decode AAC natively to PCM on Android. The decoder source code is at http://android.git.kernel.org/?p=platform/external/opencore.git;a=tree;f=codecs_v2/audio/aac/dec;hb=HEAD, but I'm not familiar with NDK at all. 1) There's no way of doing this directly using the Android SDK, but can this be done via the NDK? ...

How to pass C structs back and forth to Java code in JNI?

I've got some C functions which I am calling through JNI which take a pointer to a structure, and some other functions which will allocate/free a pointer to the same type of structure so that it is a bit easier to deal with my wrapper. Surprisingly, the JNI documentation says very little about how to deal with C structures. My C header...

Can an Android AIR app call an NDK library?

Using AIR for Android, is it possible to call from Flex into an NDK library? If so, how can this be done? I have a large C library that I need to use. I know that I can do this from an Android Java app (through JNI), but I have a large Flex codebase that I'd like to reuse. ...

unicode support in android ndk

I have a large C/C++ library that I need to use as part of an Android NDK project. This library needs to be able to intelligently process UTF8 strings (for example, conversion to lowercase/uppercase). The library has conditional compilation to punt to an OS API to do the conversion, but there don't seem to be any Android APIs for UTF8....

Android NDK - OpenGL ES Tutorial/Libraries

Hey! Im looking for an OpenGL library/framework to handle basic drawing code etc for me. Otherwise im also looking for some NDK and OpenGL ES tutorials, I cant seem to find anything out there! Any information would be helpful cheers. Adam ...

we can't enter android market from Turkiye, and ı want donwload language pack for tts....

how can ı add language pack for TTS service outof android market?? or ıf I want, how can I write my language pack and add it?? ...

Android NDK: How to clean up native code after restarting activity?

All, I'm aware that by default an activity will be killed and restarted when the screen orientation changes, or a keyboard is slid in or out. (See http://stackoverflow.com/questions/456211/activity-restart-on-rotation-android). My question is, what is the correct way to handle this from a Native code perspective? e.g. if I have a sta...

C++ Classes with android

The android NDK supports c++, but does it support c++ classes?? If so can you give a simple example and the steps needed to implement the class with the java source. ...

Bluetooth transfer from PC to Android through RFCOMM

I am trying to stream data from a laptop to native code in an android phone. Am able to pair with laptop and get data for sometime, but the native code crashes with the following message later: "failed adding to JNI pinned array ref table". Code snippet: // Java code for Bluetooth read handler case MESSAGE_READ: by...

Android C++ NDK

I am trying to compile the following for the android ndk #include <jni.h> #include <string.h> extern "C" { JNIEXPORT jstring JNICALL Java_com_knucklegames_helloCpp_testFunction(JNIEnv * env, jobject obj); }; JNIEXPORT jstring JNICALL Java_com_knucklegames_helloCpp_testFunction(JNIEnv *env, jobject obj) { return env->NewStringUTF(...

System.loadLibrary force closing Android

How do you stop this force close?? Im trying to load a c++ ndk library called helloCpp but using the following code. My program force closes as soon as it opens. I have checked that the libhelloCpp.so file is in the lib folder and it compiled with no errors. //helloCpp.java package com.knucklegames.helloCpp; import android.app.Activity...

Android JNI OpenGL crashing while used with WebViewClient.

Hello, I'm porting an application from iPhone to Android. This application uses a webpage as a menu, and then switch to an opengl surface for rendering. All is working fine on the iPhone, but on android, it randomly crashes. The OpenGL surface uses JNI for rendering. What I'm doing is I'm adding the WebClientView on top of the Ope...

How to add a custom MACRO when using NDK?

I need some custom MACROs in my NDK projects however I have no ideal how to add and I found no answers Could anyone please help? Many thanks! ...