Android ndk std::to_string support

You can try LOCAL_CFLAGS := -std=c++11, but note that not all C++11 APIs are available with the NDK’s gnustl. Full C++14 support is available with libc++ (APP_STL := c++_shared). The alternative is to implement it yourself. #include <string> #include <sstream> template <typename T> std::string to_string(T value) { std::ostringstream os ; os << value ; return … Read more

Android architecture usage?

First off, if you’re worring about binary size, you don’t really need arm64-v8a, all those devices can run the armeabi-v7a binaries just fine. Only if you really need to cram the last extra performance out of it, it might be worthwhile. As for armeabi and ARMv6; Android itself doesn’t officially support it any longer, since … Read more

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

After looking around the net. The only working solution I found is supplied by Bambuser which ported ffmpeg to use in their android application. Code is here: http://bambuser.com/opensource Basically you copy the .so files to your jni/lib directory, along with any .h files you might need, create a JNI wrapper through javah, and it works. … Read more

How to configure NDK with Android Gradle plugin 0.7

Looking through the gradle plugin code, I found the following that helped me use both NDK and prebuilt native libraries: To simply Link in Prebuilt Native Libraries, just add an ndk section to your task. For instance, I added it below in productFlavors. The abiFilter is the folder name the libs are stored in. abiFilters … Read more

Android.mk, include all cpp files

You could try something like this… FILE_LIST := $(wildcard $(LOCAL_PATH)/[DIRECTORY]/*.cpp) LOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%) … Change [DIRECTORY] to the actual directory of the files. If they are in the same directory as your .mk file then remove that part. Create the FILE_LIST variable to find all of the .cpp files under the [DIRECTORY] directory. Then use … Read more

Official “Boost library” Support for Android and iOS? [closed]

Got reply from boost community Yes. These platforms are not officially supported because no one has volunteered to run regression tests regularly for them. It is not possible for a Boost developer to test on all platforms. So developers depend on the test results of regression tests run by volunteers. For example, see http://beta.boost.org/development/tests/trunk/developer/summary.html If … Read more

How to match int to enum

If you have full control of values and enums, and they’re sequential, you can use the enum ordinal value: enum Heyo { FirstVal, SecondVal } …later int systemVal = [whatever]; Heyo enumVal = Heyo.values()[systemVal]; int againSystemVal = enumVal.ordinal();

How to use JNI bitmap operations for helping to avoid OOM when using large images? [closed]

NOTE: this is a bit old code. for the most updated one, check out the project page on github. jni/Android.mk LOCAL_PATH := $(call my-dir) #bitmap operations module include $(CLEAR_VARS) LOCAL_MODULE := JniBitmapOperations LOCAL_SRC_FILES := JniBitmapOperations.cpp LOCAL_LDLIBS := -llog LOCAL_LDFLAGS += -ljnigraphics include $(BUILD_SHARED_LIBRARY) APP_OPTIM := debug LOCAL_CFLAGS := -g #if you need to add more … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)