Ejemplo n.º 1
0
        protected override void Start()
        {
            base.Start();

            // Set additional info texts
            AddExtraInfoTexts(
                "For using RateMyApp feature, you have to enable it in NPSettings->Utility Settings.");

            plugin = VdopiaPlugin.GetInstance();       //Initialize Plugin Instance

            if (Application.platform == RuntimePlatform.Android)
            {
                plugin = VdopiaPlugin.GetInstance();       //Initialize Plugin Instance

                if (plugin != null)
                {
                    VdopiaListener.GetInstance().VdopiaAdDelegateEventHandler += onVdopiaEventReceiver;

                    //Set USER parameter used for better ad targeting and higher yield (Not mandatory)
                    //Developer can pass empty string for any Param like ""
                    //Param 1 : Age
                    //Param 2 : BirthDate (dd/MM/yyyy)
                    //Param 3 : Gender (m/f/u)
                    //Param 4 : Marital Status (single/married/unknown)
                    //Param 5 : Ethinicty (example : Africans/Asian/Russians)
                    //Param 6 : DMA Code (in String format)
                    //Param 7 : Postal Code (in String format)
                    //Param 8 : Current Postal Code (in String format)
                    //Param 9 : Location latitude in string format
                    //Param 10 : Location longitude in string format

                    plugin.SetAdRequestUserData("23", "23/11/1990", "m", "single", "Asian", "999", "123123", "321321", "", "");

                    //Set APP parameter used better Ad targeting and higher yield
                    //Developer can pass empty string for any Param like ""
                    //Param 1 : App Name
                    //Param 2 : Publisher Name
                    //Param 3 : App Domain
                    //Param 4 : Publisher Domain
                    //Param 5 : PlayStore URL of the App
                    //Param 6 : App Category (IAB category)

                    plugin.SetAdRequestAppData("UnityDemo", "Chocolate", "unity-demo.com", "chocolateplatform.com", "", "IAB9");

                    //Set Test Mode parameter used for Getting Test AD (Not mandatory)
                    //Param 1 : boolean : true if test mode enabled else false
                    //Param 2 : Hash ID (If you are testing Facebook/Google Partner Test Ad you can get from ADB Logcat)
                    //plugin.SetAdRequestTestMode(true, "XXXXXXXXXXXXXXXX");

                    //Initialize Chocolate Platform Ads Sdk!
                    plugin.ChocolateInit(API_KEY);
                }
                else
                {
                    Debug.Log("Vdopia Plugin Initialize Error.");
                }
            }
        }
Ejemplo n.º 2
0
    void Start()
    {
        Screen.fullScreen = false;              //Disable Fullscreen App

        if (Application.platform == RuntimePlatform.Android)
        {
            plugin = VdopiaPlugin.GetInstance();                     //Initialize Plugin Instance

            if (plugin != null)
            {
                //Set Delegate Receiver For Vdopia SDK Ad Event (Not Complsory)
                VdopiaListener.GetInstance().VdopiaAdDelegateEventHandler += onVdopiaEventReceiver;

                //Set USER parameter used for better Ad targeting and higher yield (Not Complsory)
                //Developer can pass empty string for any Param like ""
                //Param 1 : Age
                //Param 2 : BirthDate (dd/MM/yyyy)
                //Param 3 : Gender (m/f/u)
                //Param 4 : Marital Status (single/married/unknown)
                //Param 5 : Ethinicty (example : Africans/Asian/Russians)
                //Param 6 : DMA Code (in String format)
                //Param 7 : Postal Code (in String format)
                //Param 8 : Current Postal Code (in String format)

                Debug.Log("debug log ads => Lat and Long Start " + " Lat => " + latitude + " Long => " + longitute);
                plugin.SetAdRequestUserData("23", "23/11/1990", "m", "single", "Asian", "999", "123123", "321321", latitude, longitute);


                //Set APP parameter used better Ad targeting and higher yield (Not Complsory)
                //Developer can pass empty string for any Param like ""
                //Param 1 : App Name
                //Param 2 : Publisher Name
                //Param 3 : App Domain
                //Param 4 : Publisher Domain
                //Param 5 : PlayStore URL of the App
                //Param 6 : Ad Category
                plugin.SetAdRequestAppData("UnityDemo", "Vdopia Demo", " ", "vdopia.com", " ", "Business");

                plugin.PrefetchRewardAd(SSP_KEY);


                //Set Test Mode parameter used for Getting Test AD (Not Complsory)
                //Param 1 : boolean : true if test mode enabled else false
                //Param 2 : Hash ID (If you are testing Facebook/Google Partner Test Ad you can get from ADB Logcat)
                //plugin.SetAdRequestTestMode(true, "XXXXXXXXXXXXXXXX");
            }
            else
            {
                Debug.Log("debug log ads => Vdopia Plugin Initialize Error.");
            }
        }
        else
        {
            Debug.Log("debug log ads => Application platform is not matcth with running platform" + Application.platform + "  " + RuntimePlatform.Android);
        }
    }
    void Start()                            //Called by Unity
    {
        if (Application.platform == RuntimePlatform.Android)
        {
            plugin = VdopiaPlugin.GetInstance();                   //Initialize Plugin Instance

            if (plugin != null)
            {
                //Set Delegate Receiver For Vdopia SDK Ad Event (Not compulsory)
                VdopiaListener.GetInstance().VdopiaAdDelegateEventHandler += onVdopiaEventReceiver;

                //Set USER parameter used for better ad targeting and higher yield (Not mandatory)
                //Developer can pass empty string for any Param like ""
                //Param 1 : Age
                //Param 2 : BirthDate (dd/MM/yyyy)
                //Param 3 : Gender (m/f/u)
                //Param 4 : Marital Status (single/married/unknown)
                //Param 5 : Ethinicty (example : Africans/Asian/Russians)
                //Param 6 : DMA Code (in String format)
                //Param 7 : Postal Code (in String format)
                //Param 8 : Current Postal Code (in String format)
                //Param 9 : Location latitude in string format
                //Param 10 : Location longitude in string format

                plugin.SetAdRequestUserData("23", "23/11/1990", "m", "single", "Asian", "999", "123123", "321321", "", "");

                //Set APP parameter used better Ad targeting and higher yield
                //Developer can pass empty string for any Param like ""
                //Param 1 : App Name
                //Param 2 : Publisher Name
                //Param 3 : App Domain
                //Param 4 : Publisher Domain
                //Param 5 : PlayStore URL of the App
                //Param 6 : App Category (IAB category)

                plugin.SetAdRequestAppData("UnityDemo", "Chocolate", "unity-demo.com", "chocolateplatform.com", "", "IAB9");

                //Set Test Mode parameter used for Getting Test AD (Not mandatory)
                //Param 1 : boolean : true if test mode enabled else false
                //Param 2 : Hash ID (If you are testing Facebook/Google Partner Test Ad you can get from ADB Logcat)
                //plugin.SetAdRequestTestMode(true, "XXXXXXXXXXXXXXXX");

                //New!  Optional.  Silently pre-fetch the next reward ad without making
                //any callbacks.  The pre-fetched ad will remain in cache until you call
                //the next LoadRewardAd.
                plugin.PrefetchRewardAd("JB9dhz");
            }
            else
            {
                Debug.Log("Vdopia Plugin Initialize Error.");
            }
        }
    }
Ejemplo n.º 4
0
    /// <summary>
    /// Initialize Chocolate Ads SDK.
    /// </summary>
    public void InitializeChocolate()
    {
        chocoPlugin = VdopiaPlugin.GetInstance();

        if (chocoPlugin != null)
        {
            VdopiaListener.GetInstance().VdopiaAdDelegateEventHandler += onVdopiaEventReceiver;
            chocoPlugin.SetAdRequestUserData("23", "23/11/1990", "m", "single", "Asian", "999", "123123", "321321", "", "");
            chocoPlugin.SetAdRequestAppData("UnityDemo", "Chocolate", "unity-demo.com", "chocolateplatform.com", "", "IAB9");

            // 'XqjhRR' is a test key
            chocoPlugin.ChocolateInit("XqjhRR");
            Debugger.Log("green", "Chocolate", "Initialized.");
        }
        else
        {
            Debugger.Log("green", "Chocolate", "failed to initialize.");
        }
    }
    void Start()
    {
        if (Application.platform == RuntimePlatform.Android)
        {
            plugin = VdopiaPlugin.GetInstance();                   //Initialize Plugin Instance

            if (plugin != null)
            {
                Debug.Log("Vdopia Plugin Initialized.");
                //Set Delegate Receiver For Vdopia SDK Ad Event (Not compulsory)
                VdopiaListener.GetInstance().VdopiaAdDelegateEventHandler += onVdopiaEventReceiver;

                //plugin.SetAdRequestUserData("23", "23/11/1990", "m", "single", "Asian", "999", "123123", "321321", “”, “”);

                plugin.SetAdRequestAppData("UnityDemo", "Chocolate", "unity-demo.com", "chocolateplatform.com", "", "IAB9");

                plugin.PrefetchInterstitialAd("EnP5f4");
            }
            else
            {
                Debug.Log("Vdopia Plugin Initialize Error.");
            }
        }
    }