Mārtiņš Možeiko

Riga, Latvia

Apr
28
awarded opengl
Apr
19
awarded Revival
Mar
24
awarded Yearling
Mar
4
comment No JNI_OnLoad and no return value from native function?
Where are you calling your native code from Java?
Mar
3
comment pass string from java to c++ and using popen with NDK cased errors?
You should always call ReleaseStringUTFChars if GetStringUTFChars succeeded. Even if isCopy!=JNI_TRUE. Also there is no need cast result of c_str() to const char* because it is already const char*.
Feb
27
awarded Caucus
Feb
21
answered Build and use static library in Android NDK
Feb
19
answered How do you install the required development tools for the Android NDK on Mac OSX 10.8.x
Feb
16
comment Native arrays in android NDK
What does findEntry and releaseEntryValue do? Also you are writing to malloc'ed memory one character too much - you are allocating strlen(key) bytes, but are writing strlen(key) + 1 bytes with strcpy (it includes terminating 0 at the end).
Feb
13
comment running the NDK native-activity sample from a command-line IDE
This works perfectly fine with NativeActivty, I am using am start command for NativeActivity all the time.
Jan
22
comment How to get ndk-gdb working on Android?
ndk-build is command you invoke to build native code. ndk-build script is provided by Android NDK an is located in root of zip/tar.bz2 archive.
Jan
21
awarded Enlightened
Jan
21
awarded Nice Answer
Jan
16
awarded Yearling
Jan
16
comment Sharing a JavaVM* across threads in Android NDK
Here is jni.h file from NDK r8d platforms\android-14\arch-arm\usr\include\jni.h: pastebin.com/04RgHUYN Please show me where is android and AndroidRuntime namespaces.
Jan
6
comment Sharing a JavaVM* across threads in Android NDK
Are you serious? In which line of jni.h there is android namespace (or class) that has AndroidRuntime namespace (or class) that has getJavaVM function?
Jan
4
answered Why inline assembly doesn't work with ARC in Xcode?
Jan
3
comment Android passing large float arrays from native to java via jni. Getting error if over certain size
No reason for returning jArray. It doesn't matter which one you return. They are both equal.
Jan
3
comment Android passing large float arrays from native to java via jni. Getting error if over certain size
Don't you need to do SetFloatArrayRegion also first time you call function (when gArray == NULL)? That's why I put fill/modify jArray after if condition.
Jan
2
comment Android passing large float arrays from native to java via jni. Getting error if over certain size
I added edit with some code how to use NewGlobalRef.
1 2 3 4 5