Tag: android-ndk

Using Android Studio with Vuforia

Here is how i run a Vuforia Sample on Android Studio on Window 8 1 – download, exctract sample, remove files .project and project.properties 2 – On Android Studio : Import project, next, next … 3 – download & install android NDK http://developer.android.com/tools/sdk/ndk/index.html 4 – download & install cygwin http://cygwin.com/ 5 – edit the file […]

Galaxy Nexus – wrong CPU ABI being selected during install time

In my product I’m finding that when I install the APK file onto the Galaxy Nexus running android 4.0.1 the incorrect .so file is being installed. I have a so-called “fat” APK that includes native code for armeabi, armeabi-v7a and x86. I’m finding that the .so file for the armeabi CPU ABI is being extracted […]

Android NDK: Aborting stop?

I am working on ffmpeg for android. I have successfully compile ffmpeg-2.0.1 after that I make Android.mk file in my NDK’s sources/ffmpeg-2.0.1/android/arm as LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE:= libavcodec LOCAL_SRC_FILES:= lib/libavcodec-55.so LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include include $(PREBUILT_SHARED_LIBRARY) After that make android project and in android project Android.mk file is as LOCAL_PATH := $(call my-dir) include […]

Can't access AAssetManager in native code passed from Java in WallpaperService

I’m trying to access the the assets in native code from a custom WallpaperService. The native code compiles and works but trying to get the AAssetManager reference from the AssetManager object passed to the native function always returns NULL. Is it something to do with the fact that I am using a Service rather than […]

Android Call Recording Incoming voice not getting recorded

I’m working auto call recorder app, I’m able to record voice call on below android 6 using MediaRecorder.AudioSource.VOICE_CALL, From android 6 not able to record voice call using VOICE_CALL. I managed to record using MediaRecorder.AudioSource.MIC but here incoming voice not getting recorded and I want to record voice call in normal mode not in speaker […]

Android build system, NEON and non-NEON builds

I want to build my library for armv6, and there is some neon code that I enable at runtime if the device supports it. The neon code uses neon intrinsics, and to be able to compile it, I must enable armeabi-v7a, but that affects regular c-code (it becomes broken on some low-end devices). So, if […]

Unable to link native library in OpenCV Android sample

I have OpenCV code (c++), which I want to use in Android. To do this I have to use Android NDK. I downloaded OpenCV package for Android development (ver. 2.4.0) and did all steps from that manual. Basic samples (Java API only) run without problems. Sample #3 (Tutorial 3 (Advanced) – Add Native OpenCV) builds […]

How to build a part of Android AOSP?

I am trying to build my own libs and apps in external directory of the AOSP, but the problem is i have to run make each time and the make will compile/build whole the android. In my external apps folder i have Android.mk file, but i cannot build it using ndk-build, it will look for […]

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(env, “Hello from native code!”); } but it is giving the following error Compile++ thumb: helloCpp <= /cygdrive/c/workspace/helloCpp/jni/main.cpp /cygdrive/c/workspace/helloCpp/jni/main.cpp: […]

Capturing stdout/stderr with NDK

I am porting some existing C code to run on Android. This C code writes lots of output to stdout/stderr. I need to capture this output, either in a memory buffer or a file, so I can then send it by email or otherwise share it. How can I achieve this, ideally without modifying the […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.