Device Version Infomation(디바이스 정보)
Android Device 정보를 가져오는 코드이다.
public class AndroidVersion
{
static AndroidJavaClass versionInfo;
static AndroidVersion()
{
versionInfo = new AndroidJavaClass("android.os.Build$VERSION");
}
public static string BASE_OS
{
get
{
return versionInfo.GetStatic<string>("BASE_OS");
}
}
public static string CODENAME
{
get
{
return versionInfo.GetStatic<string>("CODENAME");
}
}
public static string INCREMENTAL
{
get
{
return versionInfo.GetStatic<string>("INCREMENTAL");
}
}
public static int PREVIEW_SDK_INT
{
get
{
return versionInfo.GetStatic<int>("PREVIEW_SDK_INT");
}
}
public static string RELEASE
{
get
{
return versionInfo.GetStatic<string>("RELEASE");
}
}
public static string SDK
{
get
{
return versionInfo.GetStatic<string>("SDK");
}
}
public static int SDK_INT
{
get
{
return versionInfo.GetStatic<int>("SDK_INT");
}
}
public static string SECURITY_PATCH
{
get
{
return versionInfo.GetStatic<string>("SECURITY_PATCH");
}
}
public static string ALL_VERSION
{
get
{
return $"BASE_OS : {BASE_OS}\n CODENAME : {CODENAME}\n " +
$"INCREMENTAL :{INCREMENTAL}\n PREVIEW_SDK_INT :{PREVIEW_SDK_INT}\n" +
$"RELEASE :{RELEASE}\n SDK :{SDK}\n SDK_INT : {SDK_INT}\n SECURITY_PATCH :{SECURITY_PATCH}";
}
}
}
반응형
Android reference OS Build.Version : [링크]
참고 Stackoverflow : [링크]
★☆☆☆☆
반응형
'개발 > Unity' 카테고리의 다른 글
Unity)하이어라키 커스텀(Hierarchy Custom) (0) | 2022.08.01 |
---|---|
Unity) 화면 캡쳐(Screen Capture) (0) | 2022.07.28 |
Unity) Z-Fighting(제트 파이팅) (0) | 2022.07.26 |
Unity)문제해결)The animation state AnimationName could not be played because it couldn't be found! (2) | 2022.07.19 |
Unity) Lerp 와 Slerp 차이 (0) | 2022.07.19 |
댓글