Skip to main content

Get Device Information (GetDeviceInfo) [Player Network SDK Only]

Retrieve the current device information. [Player Network SDK Only].

caution

If you have obtained IDFA or XWID data through the GetDeviceInfo interface, you need to pay close attention to the following matters.

IDFA: can only be used for serving and tracking/attributing advertisements within the application.Any other use of IDFA (such as security analysis) is prohibited, as is using any other identifiers for advertising.

XWID:

  1. XWID must not be used with advertising ID.
  2. Low-risk usage scenarios: Can be used to track logged-out user preferences across applications with the same signature key and for anti-fraud purposes (using Android ID to limit the information scope to the same application signature key).
  3. If using XWID for new purposes, clearly disclose specific usage scenarios in the business ROP form and pass compliance review from the business side.
  4. If using XWID for new purposes, disclose and update in the privacy agreement.

We have added xx_uaid for each channel during reporting, but these IDs are not returned in the GetDeviceInfo interface and are currently not supported.

Supported platforms

Supports Android, iOS, Windows platform.

Function Definition

public static string GetDeviceInfo(string extra_json);

Input Parameters

ParametersTypeDescription
extra_jsonstringAdditional parameters JSON string

Code Example

string deviceInfo = UnionAdapterAPI.GetReportService().GetDeviceInfo("");
string extraJson = "{\"idfa\":1, \"xwid\":1}"; // Can contain up to two key-value pairs, corresponding to sensitive data: iOS IDFA and XWID (available on all three platforms)
string deviceInfo2 = UnionAdapterAPI.GetReportService().GetDeviceInfo(extraJson);

Return Value

Device information example:

{"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_device_brand":"iPhone","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"}