public static void GetProfile(Action <bool, GDDeviceProfile> callback)
        {
            bool result = true;

            device.deviceId          = GamedoniaSilent.GetSilentId();
            device.deviceType        = platforms.ContainsKey(Application.platform.ToString()) ? platforms [Application.platform.ToString()] : "";
            device.timeZoneGMTOffset = GamedoniaDeviceInfo.GetTimeZoneGMTOffset();
            device.language          = GamedoniaDeviceInfo.GetLanguageCode();
            device.country           = GamedoniaDeviceInfo.GetCountryCode();
            device.device            = GamedoniaDeviceInfo.GetDevice();
            device.platform          = GamedoniaDeviceInfo.GetPlatform();
            device.buildVersion      = GamedoniaDeviceInfo.GetBuildVersion();
            device.os                = GamedoniaDeviceInfo.GetOS();
            device.osVersion         = GamedoniaDeviceInfo.GetOSVersion();
            device.imei              = GamedoniaDeviceInfo.GetIMEI();
            device.idfa              = GamedoniaDeviceInfo.GetIDFA();
            device.idfv              = GamedoniaDeviceInfo.GetIDFV();
            device.manufacturer      = GamedoniaDeviceInfo.GetDeviceManufacturer();
            device.model             = GamedoniaDeviceInfo.GetDeviceModel();
            device.hardware          = GamedoniaDeviceInfo.GetDeviceHardware();
            device.adTrackingEnabled = GamedoniaDeviceInfo.IsAdTrackingEnabled();
            device.jailbroken        = GamedoniaDeviceInfo.IsJailBroken();



            registeredServices = 0;

            if (services.Count == 0)
            {
                callback(true, device);
            }
            else
            {
                foreach (GDService service in services)
                {
                    service.GetProfile(device,
                                       delegate(bool success) {
                        if (!success)
                        {
                            result = false;
                        }

                        registeredServices++;
                        if (registeredServices == services.Count)
                        {
                            if (callback != null)
                            {
                                callback(result, device);
                            }
                        }
                    }
                                       );
                }
            }


            //Callback to intercept creation
        }
Пример #2
0
        public static void GetProfile(Action <bool, GDDeviceProfile> callback)
        {
            bool result = true;

            device.deviceId          = OpenUDIDPlugin.GetOpenUDID();
            device.deviceType        = platforms.ContainsKey(Application.platform.ToString()) ? platforms[Application.platform.ToString()] : "";
            device.timeZoneGMTOffset = GamedoniaDeviceInfo.GetTimeZoneGMTOffset();
            device.language          = GamedoniaDeviceInfo.GetLanguageCode();
            device.country           = GamedoniaDeviceInfo.GetCountryCode();

            registeredServices = 0;

            if (services.Count == 0)
            {
                callback(true, device);
            }
            else
            {
                foreach (GDService service in services)
                {
                    service.GetProfile(device,
                                       delegate(bool success) {
                        if (!success)
                        {
                            result = false;
                        }

                        registeredServices++;
                        if (registeredServices == services.Count)
                        {
                            if (callback != null)
                            {
                                callback(result, device);
                            }
                        }
                    }
                                       );
                }
            }
        }