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:
- XWID must not be used with advertising ID.
- 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).
- If using XWID for new purposes, clearly disclose specific usage scenarios in the business ROP form and pass compliance review from the business side.
- 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
- Unity
- Unreal Engine
Supports
Android, iOS, Windows platform.Supports
Android, iOS, Windows platform.Function Definition
- Unity
- Unreal Engine
public static string GetDeviceInfo(string extra_json);
static std::string GetDeviceInfo(const std::string &extra_json);
Input Parameters
- Unity
- Unreal Engine
| Parameters | Type | Description |
|---|---|---|
| extra_json | string | Additional parameters JSON string |
| Parameters | Type | Description |
|---|---|---|
| extra_json | std::string | Additional parameters JSON string |
Code Example
- Unity
- Unreal Engine
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);
FString deviceInfo = GUA_NAMESPACE::GUAReportService::GetDeviceInfo("");
FString extraJson = "{\"idfa\":1, \"xwid\":1}"; // Can contain up to two key-value pairs, corresponding to sensitive data: IDFA (iOS) and XWID (all platforms)
FString deviceInfo2 = GUA_NAMESPACE::GUAReportService::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"}