android-ndk
How to display available branches in Android source tree?
The quickest way to list available branches without cloning/downloading anything is this one-liner: $ git ls-remote -h https://android.googlesource.com/platform/manifest.git
How to unwind the stack to get backtrace for the specified stack pointer (SP)?
In order to to get stacktrace of code which caused SIGSEGV instead of stacktrace of the signal handler, you have to get ARM registers from ucontext_t and use them for unwinding. But it is hard to do with _Unwind_Backtrace(). Thus, if you use libc++ (LLVM STL) and compile for 32-bit ARM, better try precompiled libunwind, … Read more
How to install android ndk in linux?
The Standard Way Android’s NDK now ships as an self extracting executable. You likely need to set the executable bit: $ chmod +x android-ndk-r10c-linux-x86_64.bin $ ./android-ndk-r10c-linux-x86_64.bin The above will cause the NDK to extract into the current working directory. Manual Extraction Since the .bin file is really just a 7-Zip self extracting archive, you can … Read more
Execution failed for task ‘:app:stripDebugDebugSymbols’ in flutter
Go inside your SDK location and find the directory called ndk then delete the content inside that directory. Then build the app again. Probably the ndk version has corrupted and Android Studio will replace it with the latest.
How to find the Android version name programmatically?
As suggested earlier, reflection seems to be the key to this question. The StringBuilder and extra formatting is not required, it was added only to illustrate usage. import java.lang.reflect.Field; … StringBuilder builder = new StringBuilder(); builder.append(“android : “).append(Build.VERSION.RELEASE); Field[] fields = Build.VERSION_CODES.class.getFields(); for (Field field : fields) { String fieldName = field.getName(); int fieldValue = … Read more
Android – tutorials for OpenGL ES 2.0 using the NDK?
I’ve created an example on how to combine UI done in Java with native NDK code that does all the OpenGL rendering. It is possible to do without resorting to GLSurfaceView and JNI calls for rendering each frame like done in the NDK sample. See the code at https://github.com/tsaarni/android-native-egl-example
Android: sound API (deterministic, low latency)
SoundPool is the lowest-latency interface on most devices, because the pool is stored in the audio process. All of the other audio paths require inter-process communication. OpenSL is the best choice if SoundPool doesn’t meet your needs. Why OpenSL? AudioTrack and OpenSL have similar latencies, with one important difference: AudioTrack buffer callbacks are serviced in … Read more