Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
class CInterfaceAndroidSystem

Android platform specific functions
C++ class to query Android specific things in Kodi. More...

Functions

voidkodi::platform::CInterfaceAndroidSystem::GetJNIEnv ()
 Request an JNI env pointer for the calling thread.
 
int kodi::platform::CInterfaceAndroidSystem::GetSDKVersion ()
 Request the android sdk version to e.g. initialize JNIBase.
 
std::string kodi::platform::CInterfaceAndroidSystem::GetClassName ()
 Request the android main class name e.g. org.xbmc.kodi.
 

Detailed Description

Android platform specific functions
C++ class to query Android specific things in Kodi.

It has the header is #include <kodi/platform/android/System.h>.


Example:

#if defined(ANDROID)
if (system.GetSDKVersion() >= 23)
{
...
}
#endif
Definition kodi-dev-kit/include/kodi/platform/android/system.h:46
int GetSDKVersion()
Request the android sdk version to e.g. initialize JNIBase.
Definition kodi-dev-kit/include/kodi/platform/android/system.h:78

Function Documentation

◆ GetClassName()

std::string kodi::platform::CInterfaceAndroidSystem::GetClassName ( )
inline

Request the android main class name e.g. org.xbmc.kodi.

Returns
package class name

◆ GetJNIEnv()

void * kodi::platform::CInterfaceAndroidSystem::GetJNIEnv ( )
inline

Request an JNI env pointer for the calling thread.

JNI env has to be controlled by kodi because of the underlying threading concep.

Returns
JNI env pointer for the calling thread

◆ GetSDKVersion()

int kodi::platform::CInterfaceAndroidSystem::GetSDKVersion ( )
inline

Request the android sdk version to e.g. initialize JNIBase.

Returns
Android SDK version