logo
Free, Micro AI Code Reviews That Run on Git Commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, Micro AI Code Reviews That Run on Git Commit | Product Hunt git-lrc - Free, Micro AI Code Reviews That Run on Git Commit | Product Hunt

SDL_GetAndroidJNIEnv - Get the Android Java Native Interface Environment of the current thread.

Availability

       This function is available since SDL 3.2.0.

Description

       This  is the JNIEnv one needs to access the Java virtual machine from native code, and is needed for many
       Android APIs to be usable from C.

       The prototype of the function  in  SDL's  code  actually  declare  a  void*  return  type,  even  if  the
       implementation  returns  a  pointer  to  a  JNIEnv.  The  rationale  being that the SDL headers can avoid
       including jni.h.

Header File

       Defined in SDL3/SDL_system.h

Name

       SDL_GetAndroidJNIEnv - Get the Android Java Native Interface Environment of the current thread.

Return Value

       Returns a pointer to Java native interface object (JNIEnv) to which the current thread  is  attached,  or
       NULL on failure; call

       SDL_GetError () for more information.

See Also

(3), SDL_GetAndroidActivity(3)

Simple Directmedia Layer                           SDL 3.2.10                            SDL_GetAndroidJNIEnv(3)

Synopsis

#include"SDL3/SDL.h"void*SDL_GetAndroidJNIEnv(void);

Thread Safety

       It is safe to call this function from any thread.

See Also