Example #1
0
    private void OnAdvertisingIdLoaded(string data)
    {
        string[] info;
        info = data.Split(AndroidNative.DATA_SPLITTER [0]);


        string id = info[0];
        bool   isLimitAdTrackingEnabled = System.Convert.ToBoolean(info[1]);


        GP_AdvertisingIdLoadResult res;

        if (id != null && id.Length > 0)
        {
            res    = new GP_AdvertisingIdLoadResult(true);
            res.id = id;
            res.isLimitAdTrackingEnabled = isLimitAdTrackingEnabled;
        }
        else
        {
            res = new GP_AdvertisingIdLoadResult(false);
        }

        ActionAdvertisingIdLoaded(res);
    }
Example #2
0
    //--------------------------------------
    // EVENTS
    //--------------------------------------
    private void ActionAdvertisingIdLoaded(GP_AdvertisingIdLoadResult res)
    {
        GooglePlayUtils.ActionAdvertisingIdLoaded -= ActionAdvertisingIdLoaded;

        if(res.IsSucceeded) {
            AndroidMessage.Create("Succeeded", "Advertising Id: " + res.id);
        } else {
            AndroidMessage.Create("Failed", "Advertising Id failed to loaed");
        }
    }
    //--------------------------------------
    // EVENTS
    //--------------------------------------

    private void ActionAdvertisingIdLoaded(GP_AdvertisingIdLoadResult res)
    {
        GooglePlayUtils.ActionAdvertisingIdLoaded -= ActionAdvertisingIdLoaded;

        if (res.IsSucceeded)
        {
            AndroidMessage.Create("Succeeded", "Advertising Id: " + res.id);
        }
        else
        {
            AndroidMessage.Create("Failed", "Advertising Id failed to loaed");
        }
    }