add jni callback to refresh image