Both layers are connected via JNI, where the native library is platform dependend and must be ported and compiled for each platform.