/// <summary> /// Pre-async dispatcher of sending a Reward off to the RewardMob API /// </summary> /// <param name="rewardAmount">Amount of rewards to send</param> /// <param name="rewardMessage">Short description explaining why the rewards were earned</param> /// <param name="onSuccess">Method to call when successful</param> /// <param name="onFailed">Method to call when unsuccessful</param> public void SendReward(int rewardAmount, string rewardMessage, Action <Reward> onSuccess, Action <string> onFailed) { if (ConnectivityTester.HasInternetConnection()) { StartCoroutine(SendRewardCor(rewardAmount, rewardMessage, onSuccess, onFailed)); return; } RewardMobAnimationManager.instance.PlayDropdownAnimation( RewardMobAnimationManager.RewardMobDropdownType.WARNING, "No Internet Connection!" ); }
/// <summary> /// Method to perform the reauthentication step once a user bearer token has become expired. /// </summary> public void PerformReauthentication() { if (ConnectivityTester.HasInternetConnection()) { PlayerPrefs.DeleteKey("RewardMobAuthenticationTokenExpirationDate"); isReauthenticating = true; //go through the reauthentication steps Application.OpenURL(RewardMobEndpoints.GetAuthenticationURL()); } }