예제 #1
0
    void Init()
    {
        //Set app information for UniRate
        if (string.IsNullOrEmpty(appStoreCountry))
        {
            appStoreCountry = UniRatePlugin.GetAppStoreCountry();
            UniRateDebug.Log("Get Country Code: " + appStoreCountry);
        }
        if (string.IsNullOrEmpty(applicationVersion))
        {
            applicationVersion = UniRatePlugin.GetApplicationVersion();
            UniRateDebug.Log("Get App Version: " + applicationVersion);
        }
        if (string.IsNullOrEmpty(applicationName))
        {
            applicationName = UniRatePlugin.GetApplicationName();
            UniRateDebug.Log("Get App Name: " + applicationName);
        }
        if (string.IsNullOrEmpty(applicationBundleID))
        {
            applicationBundleID = UniRatePlugin.GetApplicationBundleID();
            UniRateDebug.Log("Get Bundle ID: " + applicationBundleID);
        }

        if (string.IsNullOrEmpty(marketPackageName))
        {
            marketPackageName = UniRatePlugin.GetPackageName();
            UniRateDebug.Log("Get Android package name: " + marketPackageName);
        }

        _promptShowing = false;

        UniRateLauched();
    }
예제 #2
0
 /// <summary>
 /// Opens the rate page directly without automatically configuration. Do not call this
 /// if you did not set the AppID for UniRate yourself. You may want to use RateIfNetworkAvailable()
 /// instead, which can retrive the correct AppiD if the network is available.
 /// </summary>
 public void OpenRatePage()
 {
     this.ratedThisVersion = true;
             #if UNITY_IOS
     UniRateDebug.Log("Open rating page of URL: " + this.RatingIOSURL);
     Application.OpenURL(this.RatingIOSURL);
             #elif UNITY_ANDROID
     UniRateDebug.Log("Open rating page of URL: " + this.RatingAndroidURL);
     UniRatePlugin.OpenAndroidRatePage(this.RatingAndroidURL);
             #elif UNITY_WP8
     UniRateDebug.Log("Open rating page for WP8");
     UniRatePlugin.OpenWPMarket();
             #endif
 }
예제 #3
0
    /// <summary>
    /// Shows the prompt, there is no check for conditions or app information getting.
    /// It depends on <see cref="appStoreID"/>, if you are not set it yourself, do not use this metod (use PromptIfNetworkAvailable instead).
    /// </summary>
    public void ShowPrompt()
    {
        UniRateDebug.Log("It's time to show prompt");
        if (OnPromptedForRating != null)
        {
            OnPromptedForRating();
        }

        if (!useCustomizedPromptView)
        {
            UniRatePlugin.ShowPrompt(this.MessageTitle,
                                     this.Message,
                                     this.RateButtonLabel,
                                     this.CancelButtonLabel,
                                     this.RemindButtonLabel);
            _promptShowing = true;
            #if UNITY_WP8
            _shouldPoll = true;
            #endif
        }
    }