internal AndroidJavaObject ConstructPrivacyManagerTab(PRIVACY_MANAGER_TAB tab)
        {
            AndroidJavaObject privacyManagerTabK = new AndroidJavaObject("com.sourcepoint.cmplibrary.model.PMTab", CSharp2JavaStringEnumMapper.GetPrivacyManagerTabKey(tab), (int)tab);

            privacyManagerTabK.Set("key", CSharp2JavaStringEnumMapper.GetPrivacyManagerTabKey(tab));
            CmpDebugUtil.Log("PMTab is OK");
            return(privacyManagerTabK);
        }
示例#2
0
        public void LoadPrivacyManager(CAMPAIGN_TYPE campaignType, string pmId, PRIVACY_MANAGER_TAB tab)
        {
#if UNITY_ANDROID
            if (Application.platform == RuntimePlatform.Android)
            {
                try
                {
                    AndroidJavaObject type = constructor.ConstructCampaignType(campaignType);
                    AndroidJavaObject privacyManagerTab = constructor.ConstructPrivacyManagerTab(tab);
                    RunOnUiThread(delegate { InvokeLoadPrivacyManager(pmId, privacyManagerTab, type, campaignType); });
                }
                catch (Exception e)
                {
                    CmpDebugUtil.LogError(e.Message);
                }
            }
#endif
        }
        public void LoadCCPAPrivacyManager(string pmId, PRIVACY_MANAGER_TAB tab)
        {
#if UNITY_IOS && !UNITY_EDITOR_OSX
            _loadCCPAPrivacyManager(pmId, (int)tab);
#endif
        }
 public static string GetPrivacyManagerTabKey(PRIVACY_MANAGER_TAB tab)
 {
     return(privacyManagerTabToJavaEnumKey[tab]);
 }
示例#5
0
        public static void LoadPrivacyManager(CAMPAIGN_TYPE campaignType, string privacyManagerId, PRIVACY_MANAGER_TAB tab)
        {
#if UNITY_ANDROID && !UNITY_EDITOR
            if (Application.platform == RuntimePlatform.Android)
            {
                ConsentWrapperAndroid.Instance.LoadPrivacyManager(campaignType: campaignType,
                                                                  pmId: privacyManagerId,
                                                                  tab: tab);
            }
#elif UNITY_IOS && !UNITY_EDITOR_OSX
            if (Application.platform == RuntimePlatform.IPhonePlayer)
            {
                if (campaignType == CAMPAIGN_TYPE.GDPR)
                {
                    ConsentWrapperIOS.Instance.LoadGDPRPrivacyManager(pmId: privacyManagerId,
                                                                      tab: tab);
                }
                else if (campaignType == CAMPAIGN_TYPE.CCPA)
                {
                    ConsentWrapperIOS.Instance.LoadCCPAPrivacyManager(pmId: privacyManagerId,
                                                                      tab: tab);
                }
            }
#endif
        }