GetDeviceInfo
AndroidiOSWindows
If you were looking for the method for use with Unreal Engine, see GetDeviceInfo for Unreal Engine SDK.
If you were looking for the method for use with Unreal Engine, see GetDeviceInfo for Unreal Engine SDK.
Get information about the current device.
caution
If obtaining IDFA, XWID, or UAID data through the GetDeviceInfo
API, pay close attention to the following matters.
IDFA: Only available for in-app serving and tracking/attribution advertising. Any other use of IDFA (such as security analytics) is prohibited, as is the use of any other identifier for advertising.
XWID:
- XWID cannot be used with advertising ID.
- Low-risk scenarios for restricted use: Can be used to track logged-out user preferences between apps with the same signing key, and for anti-fraud purposes (Use Android ID to scope information to the same app signing key).
- If obtaining XWID for new purposes, clearly disclose the specific usage scenarios in the business ROP form and pass the game-side compliance review.
- If XWID is used for new purposes, it needs to be disclosed and updated in the privacy policy.
UAID: Identifier generated by a third-party UA platform to distinguish the device, can only be used after being reviewed and approved by the compliance team.
Function definition
public static string GetDeviceInfo(string extra_json);
Input parameters
Name | Type | Description |
---|---|---|
extra_json | string | Extra parameter in JSON string |
Code sample
string deviceInfo=INTLAPI.GetDeviceInfo("");
string extraJson = "{\"idfa\":1, \"xwid\":1, \"adjust_uaid\": 1, \"appsflyer_uaid\": 1, \"firebase_uaid\": 1, \"facebook_uaid\": 1}"; // IDFA (iOS), XWID (available on all 3 platforms), and UAID are sensitive data
string deviceInfo2=INTLAPI.GetDeviceInfo(extraJson);
Return result
Example of device information:
{"comm_c_xwid":"92be4a32a74afc497ba4653dfcb7df09ec4e5gW4762f","comm_c_os":2,"comm_c_os_version":"15.4","comm_c_app_version":"1.0(1)","comm_c_device_model":"iPhone13,2","comm_c_bundle_id":"com.intlgame.demo","comm_c_carrier_id":"46002","comm_c_ram_total":3662,"comm_c_rom_total":244017,"comm_c_screen_width":1170,"comm_c_screen_height":2532,"comm_c_network_type": 2,"comm_c_cpu_name":"Apple","comm_c_cpu_core":6,"comm_c_cpu_freq":0,"comm_c_gpu_name":"Apple","comm_c_language":"zh", "comm_c_adjust_uaid":"xxxxx", "comm_c_appsflyer_uaid":"xxxxx", "comm_c_firebase_uaid":"xxxxx", "comm_c_facebook_uaid":"xxxxx"}
For decriptions of the return results, see Common Fields of Player Network SDK Data Reporting.