메타 데이터의 끝으로 건너뛰기
메타 데이터의 시작으로 이동

이 페이지의 이전 버전을 보고 있습니다. 현재 버전 보기.

현재와 비교 페이지 이력 보기

« 이전 버전 3 다음 »

16.1. System Information SDK Example


16.1.1. Retrieving language code

The language setting information in the device is retrieved. The language code returns a value in accordance with the ISO 639-1 codes.

Unity

using Kakaogame.SDK;
 
string languageCode = KGSystem.languageCode;

Android

String languageCode = KGSystem.getLanguageCode();

iOS

#import <KakaoGame/KakaoGame.h>
  
NSString *languageCode = [KGSystem languageCode];

16.1.2. Retrieving country code

  • Devices supporting 3g/LTE return a country code issued by the communication module. WIFI-only devices return a country code set in the device. (SDK 3.7.0 or higher) For wifi-only devices, the country code is collected based on GeoIP. If it fails to import GeoIP, it will be collected as the country information of the device.

  • The country code is in accordance with the ISO 3166-1 alpha-2 code, and returns zz if there is no country information

  • The country code set in the first app execution will remain. If the app or app information is deleted, the country code is re-set

Unity

using Kakaogame.SDK;
 
string countryCode = KGSystem.countryCode;

Android

String countryCode = KGSystem.getCountryCode();

iOS

#import <KakaoGame/KakaoGame.h>
  
NSString *countryCode = [KGSystem countryCode];

16.1.3. Getting Device ID

Device ID returns a value which is used to identify the device. It changes when the device is reset.

Unity

using Kakaogame.SDK;
 
string deviceId = KGSystem.deviceId;

Android

String deviceId = KGSystem.getDeviceId();

iOS

#import <KakaoGame/KakaoGame.h>
  
NSString *deviceId = [KGSystem deviceId];

16.1.4. Getting Device Model

The model information of the current device is returned.

Unity

using Kakaogame.SDK;
  
string deviceModel = KGSystem.deviceModel;

Android

String deviceModel = KGSystem.getDeviceModel();

iOS

#import <KakaoGame/KakaoGame.h>
 
NSString *deviceModel = [KGSystem deviceModel];

16.1.5. Getting OS name

The name of OS (android/ios) of the current device is returned.

Unity

using Kakaogame.SDK;
  
string osName = KGSystem.osName;

Android

String osName = KGSystem.getOSName();

iOS

#import <KakaoGame/KakaoGame.h>
NSString *osName = [KGSystem osName];

16.1.6. Getting network connection status

Shows whether the current device is connected to an external network.

Unity

using Kakaogame.SDK;
  
bool isNetworkConnected = KGSystem.isNetworkConnected;

Android

boolean networkConnected = KGSystem.isNetworkConnected();

iOS

#import <KakaoGame/KakaoGame.h>
  
BOOL isNetworkConnected = [KGSystem isNetworkConnected];

16.1.7. Get connected network type

Shows what type of external network is connected to the current device. (wifi/cellular/unknown)

Unity

using Kakaogame.SDK;
  
string networkType = KGSystem.networkType;

Android

String networkType = KGSystem.getNetworkType();

iOS

#import <KakaoGame/KakaoGame.h>
  
NSString *networkType = [KGSystem networkType];



  • 레이블 없음