private static IEnumerator DelayOpenApp(CrossPromotionItemConfig item)
        {
            yield return(null);

            yield return(null);

            interact.Invoke(Interact.InstallApp, item);
            Application.OpenURL(item.GetLink());
        }
        static void CheckCrosspromotionStatus(CrossPromotionData data, bool isInit)
        {
            List <CrossPromotionItemConfig> items = crossPromotionConfig.GetList();

            for (int i = 0; i < items.Count; i++)
            {
                CrossPromotionItemConfig item = items[i];
                if (item.enable || isInit)
                {
                    CheckCrosspromotionStatus(data, item, isInit);
                }
            }
        }
Beispiel #3
0
        public string GetAppId(int id)
        {
            CrossPromotionItemConfig itemConfig = GetCrossPromotionItemConfig(id);

            if (itemConfig != null)
            {
#if UNITY_IPHONE
                return(itemConfig.iosLink);
#else
                return(itemConfig.androidLink);
#endif
            }
            else
            {
                return("invalid");
            }
        }
        static void CheckCrosspromotionStatus(CrossPromotionData data, CrossPromotionItemConfig item, bool isInit)
        {
            string id = Utils.GetValueFromUrl(item.GetLink(), "id");

            if (Utils.checkPackageAppIsPresent(id))
            {
                if (isInit)
                {
                    data.GetItem(item.id).SetInvalid();
                }
                else
                {
                    if (data.GetItem(item.id).isValid)
                    {
                        data.GetItem(item.id).SetComplete();
                    }
                }
            }
        }