这里只有每个分享监听 具体参考友盟分享集成(最好下一个友盟分享demo看看)
提示 微信分享要自己改appid 和appsecret
改为自己的
package com.umeng.soexample.share_auth;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.Toast;
import com.umeng.socialize.Config;
import com.umeng.socialize.ShareAction;
import com.umeng.socialize.UMShareAPI;
import com.umeng.socialize.UMShareListener;
import com.umeng.socialize.bean.SHARE_MEDIA;
import com.umeng.socialize.media.UMImage;
import com.umeng.socialize.media.UMVideo;
import com.umeng.socialize.media.UMusic;
import com.umeng.socialize.shareboard.SnsPlatform;
import com.umeng.socialize.utils.Log;
import com.umeng.socialize.utils.ShareBoardlistener;
import com.umeng.soexample.R;
/**
* Created by umeng on 15/9/14.
*/
public class ShareActivity extends Activity{
private CheckBox cb;
public void onClick(View view) {
//Bitmap bitmap = BitmapFactory.decodeResource(getResources(),R.drawable.info_icon_1);
UMImage image = new UMImage(ShareActivity.this, "http://www.umeng.com/images/pic/social/integrated_3.png");
//UMImage image = new UMImage(ShareActivity.this,bitmap);
//UMImage image = new UMImage(ShareActivity.this,new File("/SDCARD/image_jpg.jpg"));
UMusic music = new UMusic("http://music.huoxing.com/upload/20130330/1364651263157_1085.mp3");
//UMusic music = new UMusic("http://y.qq.com/#type=song&mid=002I7CmS01UAIH&tpl=yqq_song_detail");
music.setTitle("This is music title");
music.setThumb("http://www.umeng.com/images/pic/social/chart_1.png");
music.setDescription("my description");
// share video
UMVideo video = new UMVideo("http://video.sina.com.cn/p/sports/cba/v/2013-10-22/144463050817.html");
video.setThumb("http://www.adiumxtras.com/images/thumbs/dango_menu_bar_icon_set_11_19047_6240_thumb.png");
// share URL
String url = "http://www.umeng.com";
switch (view.getId()){
case R.id.app_open_share:
/**shareboard need the platform all you want and callbacklistener,then open it**/
new ShareAction(this).setDisplayList(SHARE_MEDIA.SINA,SHARE_MEDIA.QQ,SHARE_MEDIA.QZONE,SHARE_MEDIA.WEIXIN,SHARE_MEDIA.WEIXIN_CIRCLE,SHARE_MEDIA.WEIXIN_FAVORITE)
.withTitle("友盟分享")
.withText("来自友盟分享面板")
.withMedia(image)
.withTargetUrl(url)
.setCallback(umShareListener)
//.withShareBoardDirection(view, Gravity.TOP|Gravity.LEFT)
.open();
/**分享面板增加自定义按钮,以及不同分享平台不同分享内容,不同回调监听**/
// new ShareAction(t