public void Onclick(SnsPlatform snsPlatform, SHARE_MEDIA media)
 {
     new ShareAction(context).WithMedia(umWeb)
     .SetPlatform(media)
     .SetCallback(this)
     .Share();
 }
Пример #2
0
 public void Onclick(SnsPlatform snsPlatform, SHARE_MEDIA media)
 {
     if (snsPlatform.MShowWord.Equals("umeng_sharebutton_copy"))
     {
         try {
             ClipboardManager cm = (ClipboardManager)context.GetSystemService(Context.ClipboardService);
             // 将文本内容放到系统剪贴板里。
             cm.Text = umWeb.ToUrl();
             Toast.MakeText(context, "已复制链接到剪贴板", ToastLength.Short).Show();
         }
         catch (System.Exception ex) {
             Toast.MakeText(context, "很抱歉,浏览器打开失败", ToastLength.Short).Show();
         }
     }
     else if (snsPlatform.MShowWord.Equals("umeng_sharebutton_copyurl"))
     {
         try {
             Intent intent = new Intent(Intent.ActionView);
             intent.SetData(Android.Net.Uri.Parse(umWeb.ToUrl()));
             context.StartActivity(intent);
         }
         catch (System.Exception ex) {
             Toast.MakeText(context, "很抱歉,浏览器打开失败", ToastLength.Short).Show();
         }
     }
     else
     {
         new ShareAction(context).WithMedia(umWeb)
         .SetPlatform(media)
         .SetCallback(this)
         .Share();
     }
 }
Пример #3
0
        public void Onclick(SnsPlatform snsPlatform, SHARE_MEDIA media)
        {
            UMWeb web = new UMWeb("http://kb.cnblogs.com/page/" + kbarticle.Id + "/");

            web.Title       = kbarticle.Title;
            web.Description = kbarticle.Summary;
            new ShareAction(this).WithMedia(web)
            .SetPlatform(media)
            .SetCallback(new UMengCustomShare(this))
            .Share();
        }
Пример #4
0
 public void OnResult(SHARE_MEDIA platform)
 {
     if (platform == SHARE_MEDIA.WeixinFavorite)
     {
         Toast.MakeText(context, "收藏成功", ToastLength.Short).Show();
     }
     else
     {
         Toast.MakeText(context, "分享成功", ToastLength.Short).Show();
     }
 }
 public void OnResult(SHARE_MEDIA platform)
 {
     if (platform == SHARE_MEDIA.WeixinFavorite)
     {
         Toast.MakeText(context, "Collect Successful", ToastLength.Short).Show();
     }
     else
     {
         Toast.MakeText(context, "Sahre Successful", ToastLength.Short).Show();
     }
 }
Пример #6
0
        public void Onclick(SnsPlatform snsPlatform, SHARE_MEDIA media)
        {
            UMWeb web = new UMWeb("https://q.cnblogs.com/q/" + question.Qid + "/");

            web.Title       = question.Title;
            web.Description = question.Summary;
            new ShareAction(this).WithMedia(web)
            .SetPlatform(media)
            .SetCallback(new UMengCustomShare(this))
            .Share();
        }
Пример #7
0
 public void OnResult(SHARE_MEDIA media)
 {
     if (media == SHARE_MEDIA.WeixinFavorite)
     {
         AlertUtil.ToastShort(context, "Êղسɹ¦");
     }
     else
     {
         AlertUtil.ToastShort(context, "·ÖÏí³É¹¦");
     }
 }
Пример #8
0
 public void OnResult(SHARE_MEDIA platform)
 {
     if (platform.Name().Equals("WeixinFavorite"))
     {
         Toast.MakeText(context, "收藏成功啦", ToastLength.Short).Show();
     }
     else
     {
         Toast.MakeText(context, "分享成功啦", ToastLength.Short).Show();
     }
 }
Пример #9
0
        public void Onclick(SnsPlatform snsPlatform, SHARE_MEDIA media)
        {
            UMWeb web = new UMWeb(article.Url);

            web.Title       = article.Title;
            web.Description = article.Description;
            new ShareAction(this).WithMedia(web)
            .SetPlatform(media)
            .SetCallback(new UMengCustomShare(this))
            .Share();
        }
Пример #10
0
        public void Onclick(SnsPlatform snsPlatform, SHARE_MEDIA media)
        {
            UMWeb web = new UMWeb(Resources.GetString(Resource.String.open_source_url));

            web.Title       = Resources.GetString(Resource.String.share_title);
            web.Description = Resources.GetString(Resource.String.share_title);
            web.SetThumb(new UMImage(this, Resource.Mipmap.ic_launcher));
            new ShareAction(this).WithMedia(web)
            .SetPlatform(media)
            .SetCallback(new UMengCustomShare(this))
            .Share();
        }
Пример #11
0
        public void Onclick(SnsPlatform snsPlatform, SHARE_MEDIA media)
        {
            var icon = news.TopicIcon;

            if (icon.IndexOf("https://") == -1)
            {
                icon = "https:" + icon;
            }
            UMWeb web = new UMWeb("https://news.cnblogs.com/n/" + news.Id + "/");

            web.Title       = news.Title;
            web.Description = news.Summary;
            web.SetThumb(new UMImage(this, icon));
            new ShareAction(this).WithMedia(web)
            .SetPlatform(media)
            .SetCallback(new UMengCustomShare(this))
            .Share();
        }
Пример #12
0
 //IShareBoardListener
 public void Onclick(SnsPlatform snsPlatform, SHARE_MEDIA media)
 {
     if (snsPlatform.MShowWord.Equals("ä¯ÀÀÆ÷´ò¿ª"))
     {
         try
         {
             Intent intent = new Intent(Intent.ActionView);
             intent.SetData(Android.Net.Uri.Parse(umWeb.ToUrl()));
             context.StartActivity(intent);
         }
         catch (System.Exception e)
         {
             AlertUtil.ToastShort(context, "ä¯ÀÀÆ÷´ò¿ªÊ§°Ü");
         }
     }
     else
     {
         new ShareAction(context).WithMedia(umWeb)
         .SetPlatform(media)
         .SetCallback(this)
         .Share();
     }
 }
Пример #13
0
 public void Onclick(SnsPlatform snsPlatform, SHARE_MEDIA media)
 {
     if (snsPlatform.MShowWord.Equals("umeng_sharebutton_copy"))
     {
         try
         {
             Intent intent = new Intent(Intent.ActionView);
             intent.SetData(Android.Net.Uri.Parse(umWeb.ToUrl()));
             context.StartActivity(intent);
         }
         catch (System.Exception ex)
         {
             MobclickAgent.ReportError(context, ex.Message);
             Toast.MakeText(context, "很抱歉,浏览器打开失败", ToastLength.Short).Show();
         }
     }
     else
     {
         new ShareAction(context).WithMedia(umWeb)
         .SetPlatform(media)
         .SetCallback(this)
         .Share();
     }
 }
Пример #14
0
 public void OnError(SHARE_MEDIA platform, Throwable p1)
 {
     Toast.MakeText(context, "Share  Failed", ToastLength.Short).Show();
 }
Пример #15
0
 //IUMShareListener
 public void OnCancel(SHARE_MEDIA p0)
 {
     //throw new NotImplementedException();
     shareAction.Close();
 }
Пример #16
0
 public void OnCancel(SHARE_MEDIA platform)
 {
     Toast.MakeText(context, "Share  Cannel", ToastLength.Short).Show();
 }
Пример #17
0
 public void OnError(SHARE_MEDIA p0, Throwable p1)
 {
     AlertUtil.ToastShort(context, "·ÖÏíʧ°ÜÁË");
 }
Пример #18
0
 public void OnStart(SHARE_MEDIA platform)
 {
 }
Пример #19
0
 public void OnStart(SHARE_MEDIA p0)
 {
     //throw new NotImplementedException();
 }