Android JNI sample: call back architecture design