logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_GetAndroidActivity - Retrieve the Java instance of the Android activity class.

Availability

       This function is available since SDL 3.2.0.

Description

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

       The jobject returned by the function is a local reference and must be released by  the  caller.  See  the
       PushLocalFrame() and PopLocalFrame() or DeleteLocalRef() functions of the Java native interface:

       https://docs.oracle.com/javase/1.5.0/docs/guide/jni/spec/functions.html

Header File

       Defined in SDL3/SDL_system.h

Name

       SDL_GetAndroidActivity - Retrieve the Java instance of the Android activity class.

Return Value

       Returns  the  jobject representing the instance of the Activity class of the Android application, or NULL
       on failure; call

       SDL_GetError () for more information.

See Also

(3), SDL_GetAndroidJNIEnv(3)

Simple Directmedia Layer                           SDL 3.2.10                          SDL_GetAndroidActivity(3)

Synopsis

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

Thread Safety

       It is safe to call this function from any thread.

See Also