android-ndk

Android OpenAL?

Has anyone built OpenAL for the Android, or found the shared library for it on the system? This seems like an obvious need for a game of any kind, yet there's no resources out there for it. It seems the Android java sound library can't do pitch changes from what I can tell, so there seems a need for OpenAL. I know OpenAL Soft can be b...

Someone please help google create instuctions that windows users understand. googles "instructions" for the Android NDK install.

Below are the only instructions i managed to find from google on how to install the android NDK, it is written as if we all run Linux and presumes we all understand what these obscure tools are. My comments and questions appear in Italics if somone who knows unix and windows would translate for google that would be great! Android NDK ...

Android NDK jni problem

I have started teaching myself about the Android NDK and I have followed this example here - http://marakana.com/forums/android/android_examples/49.html I have followed the steps perfectly but when I run the application I get the following error: Trying to load lib /data/data/com.cnetworks.ndk/lib/libndk_demo.so 0x435c2d20 Added shared...

How to get the path to the lib folder for an installed package

Shared libraries .so files are placed in lib/armeabi in an apk file. I have read after installation the libs gets extracted to /data/data/application_package/lib How can I get the exact path to this directory in my application at run time? Is this directory readable by the application? Or is only executeable access allowed? If it is re...

How to call Java method from C++

Hi, I am using JNI to call my C++ function from Java. One of the C++ function's arguments is jobject thiz (as far as I know, all JNI native functions have this argument). The function takes quite long to complete and I want to report progress back to the jobject thiz Java object, so that I can show the progress to the user. How can I cal...

What can I access in Androids Native libraries? And How?

I am completely new to the NDK. I have done a couple of the tutorials including the hello from jni one and another one that calculates the sum of two numbers. They involved using cygwin and the ndk to create the library so file and I have a bit of a grasp on how to insert my own libraries into the libraries layer of Android. I have no...

ffmpeg for a android (using tutorial: "ffmpeg and Android.mk")

Hi to all, I am trying to compile ffmpeg for a android. I have found several posts on this theme but non of these seems to work. If tried to build ffmpeg like it is posted on [1]. Did anybody successfully compile ffmpeg using theses tutorial? I am not sure how to realize step 4 to 5. STEP4: Configuring ... STEP5: cd to your ND...

Reading Resource Files from my own APK in Android Native Environment

I'm porting to Android. My existing project has a ton of resource files that I'm porting into my Android project. I have them all in /res/raw/, and I would like to access those resources in my native library with functions such as fopen() and such. Can this be done, or do I have to go through JNI for this as well? I would really pref...

The WeTab will run Android applications but uses an Atom CPU. What does this mean for NDK and MonoDroid?

I'm guessing MonoDroid compiles directly into ARM code. And the NDK, too. ...

Linux C++: Linker is outputting strange errors

Alright, here is the output I get: arm-none-linux-gnueabi-ld --entry=main -dynamic-linker=/system/bin/linker -rpath-link=/home/oem/android-ndk-r3/build/platforms/android-5/arch-arm/usr/lib -L/home/oem/android-ndk-r3/build/platforms/android-5/arch-arm/usr/lib -nostdlib -lstdc++ -lm -lGLESv1_CM -rpath=/home/oem/android-ndk-r3/build/platfo...

New to C/C++ Using Android NDK to port Legacy code, getting compile errors

I have been trying to take some old Symbian C++ code over to Android today using the NDK. I have little to no C or C++ knowledge so its been a chore, however has to be done. My main issue is that I'm having trouble porting what I believe is Symbian specifi code to work using the small C/C++ subset that is available with the Android NDK...

Android: Statically link against libstdc++

Hi, my program compiles nicely for Android, however when I try to copy it to the Android emulator, it gives the following error: knight666@Katja-Linux /media/Data/Shared/Galaxians $ acpy Galaxians.android Filename: 'Galaxians.android' 819 KB/s (420657 bytes in 0.501s) link_image[1638]: 825 could not load needed library 'libstdc++.so....

Porting Symbian C++ to Android NDK

I've been given some Symbian C++ code to port over for use with the Android NDK. The code has lots of Symbian specific code in it and I have very little experience of C++ so its not going very well. The main thing that is slowing me down is trying to figure out the alternatives to use in normal C++ for the Symbian specific code. At th...

Is it possible to implement a secure application to block internet on Android in roaming?

I need to develop an application that will check whether the phone is in roaming. If it's in roaming then the application should block internet for all applications except several from white list. In non-roaming mode it should allow all requests. There should be no way for user to kill or suspend the application or turn internet on. I'm ...

stdexcept On Android

I'm trying to compile SoundTouch on Android. I started with this configure line: ./configure CPPFLAGS="-I/Volumes/android-build/mydroid/development/ndk/build/platforms/android-3/arch-arm/usr/include/" LDFLAGS="-Wl,-rpath-link=/Volumes/android-build/mydroid/development/ndk/build/platforms/android-3/arch-arm/usr/lib -L/Volumes/android-bu...

Porting a C++ application to android

Is it possible to port a C++ application which uses the STL extensively to Android? I understand that currently the NDK does not support this, but is there any effort (open source or otherwise) underway to achieve this? If not is there a way to cross compile libstdc++ for Android? ...

Fault address when malloc/free pthread_t across threads

Fault address occurred when i malloc pthread_t to save a newly created thread id and free it in another thread. Codes as follows: typedef struct _TaskInfo { // int dummy_int; pthread_t tid; } TaskInfo; void* dummy_task(void* pArg) { free(pArg); return NULL; } void create_task() { TaskInfo *pInfo; pthread_attr_...

Getting the System tick count with basic C++?

I essentially want to reconstruct the getTickCount() windows function so I can use it in basic C++ without any non standard libraries or even the STL. (So it complies with the libraries supplied with the Android NDK) I have looked at clock() localtime time But I'm still unsure whether it is possible to replicate the get...

How to create named pipe (mkfifo) in Android?

I am having trouble in creating named pipe in Android and the example below illustrates my dilemma: res = mkfifo("/sdcard/fifo9000", S_IRWXO); if (res != 0) { LOG("Error while creating a pipe (return:%d, errno:%d)", res, errno); } The code always prints: Error while creating a pipe (return:-1, errno:1) I can't figure out exactl...

GCC: Simple inheritance test fails

I'm building an open source 2D game engine called YoghurtGum. Right now I'm working on the Android port, using the NDK provided by Google. I was going mad because of the errors I was getting in my application, so I made a simple test program: class Base { public: Base() { } virtual ~Base() { } }; // class Base class Vehic...