| | |
| | | var _code = (int)_json["code"];
|
| | | switch (_code)
|
| | | {
|
| | | case CodeA2U.DeviceInfo:
|
| | | case CodeA2U.DeviceInfo:
|
| | |
|
| | | Device = new DeviceInfo
|
| | | {
|
| | | imei = _json["imei"].ToString(),
|
| | | uniqueID = _json["unique_id"].ToString(),
|
| | | macAddress = _json["mac"].ToString(),
|
| | | androidID = _json["android_id"].ToString(),
|
| | | userAgent = _json["userAgent"].ToString(),
|
| | | totalMemory = (int)_json["memoryTotal"]
|
| | | };
|
| | |
|
| | | Device = new DeviceInfo ();
|
| | | Device.uniqueID = _json ["unique_id"].ToString ();
|
| | | Device.androidID = _json ["android_id"].ToString ();// ios平台下为idfa
|
| | | Device.userAgent = _json ["userAgent"].ToString ();
|
| | | #if UNITY_ANDROID
|
| | | Device.macAddress = _json ["mac"].ToString ();
|
| | | Device.imei = _json ["imei"].ToString ();
|
| | | Device.totalMemory = (int)_json ["memoryTotal"];
|
| | | #endif
|
| | | if (OnDeviceInfoChanged != null)
|
| | | {
|
| | | OnDeviceInfoChanged(Device);
|
| | |
| | |
|
| | | #endregion
|
| | |
|
| | | public struct DeviceInfo
|
| | | public class DeviceInfo
|
| | | {
|
| | | public string imei;
|
| | | public string macAddress;
|