Skip to main content

GetDeviceInfo [Player Network SDK Only]

[Player Network SDK Only] Get information about the current device.

caution

If obtaining IDFA or XWID data through the GetDeviceInfo interface, 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:

  1. XWID cannot be used with advertising ID.
  2. 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).
  3. If obtaining XWID for new purposes, clearly disclose the specific usage scenarios in the business ROP form and pass the game-side compliance review.
  4. If XWID is used for new purposes, it needs to be disclosed and updated in the privacy policy.

The xx_uaid of each channel has been added when reporting, but is currently not returned in the GetDeviceInfo interface due to not being supported.

Supported Platform

Supports Android, iOS, Windows platform.

Function Definition

public static string GetDeviceInfo(string extra_json);

Input Parameters

ParameterTypeDescription
extra_jsonstringJSON string for extra parameter

Code Sample

string deviceInfo=UnionAdapterAPI.GetReportService().GetDeviceInfo("");
string extraJson = "{\"idfa\":1, \"xwid\":1}";// Maximum two pairs of kv, corresponding to sensitive data for iOS IDFA and XWID (all 3 platforms) respectively
string deviceInfo2=UnionAdapterAPI.GetReportService().GetDeviceInfo(extraJson);

Return Value

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_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"}