Example #1
0
        public void OnClick(View v)
        {
            Kiip manager = Kiip.Instance;

            switch (v.Id)
            {
            case Resource.Id.getActivePromos:
                manager.GetActivePromos(mActivePromosListener);
                break;

            case Resource.Id.unlockAchievement:
                manager.UnlockAchievement(mAchievementId.Text, new RewardRequestListener(this)
                {
                });
                break;

            case Resource.Id.saveLeaderboard:
                manager.SaveLeaderboard(mLeaderboardId.Text, 100, mRewardsListener);
                break;

            case Resource.Id.showNotification:
                if (mResources.Count > 0)
                {
                    ME.Kiip.Api.Resource resource = mResources[0];
                    manager.ShowResource(resource);
                }
                break;

            case Resource.Id.showFullscreen:
                if (mResources.Count > 0)
                {
                    toast("Showing Fullscreen (" + mResources.Count + ")");

                    ME.Kiip.Api.Resource resource = mResources[0];
                    resource.Position = ME.Kiip.Api.Kiip.Position.Fullscreen;
                    manager.ShowResource(resource);
                }
                break;

            case Resource.Id.newActivity:
                Intent intent = new Intent(this, this.Class);
                StartActivity(intent);
                break;
            }
        }
Example #2
0
 public void OnFinished(Kiip p0, Java.Lang.Object p1)
 {
     ME.Kiip.Api.Resource response = p1.JavaCast <ME.Kiip.Api.Resource>();
     if (response != null)
     {
         if (mRewardActionToggle.Checked)
         {
             p0.ShowResource(response);
         }
         else
         {
             example.toast("Reward Queued");
             example.mResources.Add(response);
         }
     }
     else
     {
         example.toast("No Reward");
     }
 }
 public void OnFinished(Kiip p0, Java.Lang.Object p1)
 {
     ME.Kiip.Api.Resource response = p1.JavaCast<ME.Kiip.Api.Resource>();
     if (response != null)
     {
         if (mRewardActionToggle.Checked)
         {
             p0.ShowResource(response);
         }
         else
         {
             example.toast("Reward Queued");
             example.mResources.Add(response);
         }
     }
     else
     {
         example.toast("No Reward");
     }
 }