Tag: android-ndk

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? UPDATE: Ndk Revision 5 promises […]

How to set variable according to gradle flavors

I want to pass a variable test that I set differently per flavor as a define to the NDK. But for some reason he always passes the value of the last flavor. Here is the build.gradle: apply plugin: ‘com.android.library’ def test android { compileSdkVersion 23 buildToolsVersion “23.0.2” defaultPublishConfig “flavorARelease” publishNonDefault true defaultConfig { minSdkVersion 15 […]

easiest way to debug crash in native library, linked by Android app?

I have ported and created several low-level C-libraries to Android for my use in my application. I cross-compiled them using the NDK, and then link to them using System.loadLibrary(). After some amount of time, my application crashes, seemingly due to a bug in the library: 07-28 11:31:21.675: INFO/DEBUG(2880): *** *** *** *** *** *** *** […]

How do I create a shared library in C++ for both Android and iOS?

I am using LibGDX to write apps for both Android and iOS and I want to be able to add C++ code to my apps to optimize certain parts and to port some functions etc. I have been searching the internet and tried to follow some tutorials, but did not find what I need. How […]

Airplane mode in Jelly Bean

I am trying to set the airplane mode in a Nexus 4 with Android 4.2.2. I know it is not possible since AIRPLANE_MODE_ON was moved to Global system settings and it is just a read option. Is there any other way to do something similar, I mean disable the radio? I can disable Bluetooth, wifi […]

Any experience with Android NDK?

I’m specifically interested in how portable it is between various phones. We have an application with some computation heavy code we’d like to share between Android and iPhone. If we could write it in C, we’d have a single code-base, but if the NDK only supports a subset of the processors that phone manufacturers are […]

Build issue when using <cmath> with android ndk

I have a simple file stlTest2.cpp like this: #include <jni.h> #include <cmath> bool isnan (void); There is something more complicated in some code I am porting. My question is this. Why would this work when building using GCC outside of the NDK, but not with using the NDK? There error it gives is this: jni/stlTest2.cpp:6: […]

Want to create a plugin in Cocos2d for my SDK

I have created an SDK, currently its for both Android and iOS. But now i also have to give the support in cocos2d platform. Does any one how to achieve this? I already have working this SDKs working in native. But i am going through the some blogs but cant find any easy tutorial of […]

Android Pre-installing NDK Application

We are trying to pre-install a NDK Application into the /system/app directory. If I open the apk file in a ZIP file manager, the .so file is inside the lib directory. However, when we preinstall the apk file, the apk’s .so file is not copied to system/lib directory, causing for the application to fail when […]

NDK application Signature Check

I have some security key in an application. I want to store it securly. I like to store it in a native shared library (maybe generated from some code). After that I want it to be returned by a method that will check the signature of the original APK. So no one can use this […]

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