public class ResourcesManager {

	private static ResourcesManager instance;
	private Context context;
	public static String testImage;
	public static String testVideo;
	public static String testImageUrl;
	public static HashMap<Integer, String> testText;

	private String filePath ;
	private String title;
	private String titleUrl;
	private String url;
	private String musicUrl;
	private String musicPath;
	private String text;
	private String imagePath ;
	private String imageUrl ;
	private String comment;
	private String site;
	private String siteUrl;
	private String venueName;
	private Bitmap imageBmp;
	public static final String NOTEBOOK = "notebook";
	public static final String STACK = "stack";
	public static final String[] TAGS ={"tags"} ;
	public static final boolean IS_PUBLIC =  false;
	public static final boolean IS_FRIEND = false;
	public static final boolean IS_FAMILY = false;
	public static final String VENUE_NAME = "ShareSDK";
	public String [] imgArrays;
	public static float latitude = 23.169f;
	public static float longitude = 112.908f;
	public static final String VENUE_DESCRIPTION = "This is a beautiful place!";
	public String venueId = null;
	public String checkId = null;
	public static final String EXT_INFO = "extInfo";
	public static final String ADDRESS = "address";
	private String venueDescription;
	public static final String IMAGE_TEST_URL = "http://pic28.photophoto.cn/20130818/0020033143720852_b.jpg";
	public static final String IMAGE_TEST_URL_TWO = "https://cdn.pixabay.com/photo/2019/08/08/11/33/stingray-4392776_960_720.jpg";
	public static final String PIC1="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fcambrian-images.cdn.bcebos.com%2Fb5e7f938e8233fdbe343817b5a2610bb_1513843872877.jpeg";
	public static final String PIC2="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fwx3.sinaimg.cn%2Flarge%2F00248yFrly4grmk1mrdepj605k05kt8m02.jpg";
	public static ResourcesManager getInstace(Context context){
		synchronized (ResourcesManager.class){
			if(instance == null){
				synchronized (ResourcesManager.class){
					if(instance == null){
						instance = new ResourcesManager(context);
					}
				}
			}
		}
		return instance;
	}

	public String getTitle() {
		if(TextUtils.isEmpty(title)){
			return context.getString(R.string.evenote_title);
		}
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getTitleUrl() {
		if(TextUtils.isEmpty(titleUrl)){
			return "http://mob.com";
		}
		return titleUrl;
	}

	public void setTitleUrl(String titleUrl) {
		this.titleUrl = titleUrl;
	}

	public String getUrl() {
		if(TextUtils.isEmpty(url)){
			return "http://www.mob.com";
		}
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getMusicUrl() {
		if(TextUtils.isEmpty(musicUrl)){
			return "https://mp3.9ku.com/hot/2010/09-30/398811.mp3";
		}
		return musicUrl;
	}

	public void setMusicUrl(String musicUrl) {
		this.musicUrl = musicUrl;
	}

	public String getText() {
		if(TextUtils.isEmpty(text)){
			return context.getString(R.string.share_content);
		}
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getImagePath() {
		if(TextUtils.isEmpty(imagePath)){
			download();
		}
		return imagePath;
	}

	public void setImagePath(String imagePath) {
		this.imagePath = imagePath;
	}

	public String getImageUrl() {
		return imageUrl;
	}

	public void setImageUrl(String imageUrl) {
		this.imageUrl = imageUrl;
	}

	public String getComment() {
		if(TextUtils.isEmpty(comment)){
			return context.getString(R.string.ssdk_oks_share);
		}
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public String getSite() {
		if(TextUtils.isEmpty(site)){
			return context.getString(R.string.app_name);
		}
		return site;
	}

	public void setSite(String site) {
		this.site = site;
	}

	public String getSiteUrl() {
		if(TextUtils.isEmpty(siteUrl)){
			return "http://mob.com";
		}
		return siteUrl;
	}

	public void setSiteUrl(String siteUrl) {
		this.siteUrl = siteUrl;
	}

	public String getVenueName() {
		if(TextUtils.isEmpty(venueName)){
			return "ShareSDK";
		}
		return venueName;
	}

	public void setVenueName(String venueName) {
		this.venueName = venueName;
	}

	public String getVenueDescription() {
		if(TextUtils.isEmpty(venueDescription)){
			return "This is a beautiful place!";
		}
		return venueDescription;
	}

	public void setVenueDescription(String venueDescription) {
		this.venueDescription = venueDescription;
	}

	private ResourcesManager(final Context context){
		this.context = context;
		download();
	}

	private void download(){
		new Thread() {
			public void run() {
				String[] urls = randomPic();
				testImageUrl = urls[1];
				//imageUrl = urls[1];
				imageUrl = "http://pic28.photophoto.cn/20130818/0020033143720852_b.jpg";
				try {
					//testImage = BitmapHelper.downloadBitmap(MobSDK.getContext(), urls[3]);
					testImage = BitmapHelper.downloadBitmap(MobSDK.getContext(),
							PIC1);
					imageBmp = BitmapHelper.getBitmap(testImage);
					imagePath = testImage;
				} catch (Throwable t) {
					testImage = null;
					try {
						testImage = BitmapHelper.downloadBitmap(MobSDK.getContext(), PIC2);
					} catch (Throwable throwable) {
						Log.e("QQQ", "初始化第二次下载图片失败" );
					}
				}
				initTestText();
				//				String videoUrl = "http://www.mob.com/video/ShareSDK.mp4";
				String videoUrl = "https://highlight-video.cdn.bcebos.com//video//6s//393e812e-b9e6-11eb-858e-7cd30ac11c56.mp4";
				try {
					testVideo = new NetworkHelper().downloadCache(MobSDK.getContext(), videoUrl, "videos", true, null);
					filePath = testVideo;
				} catch (Throwable e) {
					e.printStackTrace();
					filePath=MobSDK.getContext().getExternalFilesDir(Environment.DIRECTORY_MOVIES).getAbsolutePath() + "/Mob/test.mp4";
				}
				try {
					musicPath = new NetworkHelper().downloadCache(MobSDK.getContext(), getMusicUrl(), "music", true, null);
					Log.e("mob","musicPath="+musicPath);
				} catch (Throwable throwable) {
					Log.e("mob","download Music e="+throwable.getMessage());
					throwable.printStackTrace();
				}
				Log.e("mob","test video path="+filePath);
			}
		}.start();
	}

	private void initTestText() {
		testText = new HashMap<Integer, String>();
		try {
			NetworkHelper network = new NetworkHelper();
			NetworkHelper.NetworkTimeOut timeOut = null;
			String resp = network.httpGet("http://mob.com/Assets/snsplat.json", null, null, timeOut);
			JSONObject json = new JSONObject(resp);
			int status = json.optInt("status");
			if (status == 200) {
				JSONArray democont = json.optJSONArray("democont");
				if (democont != null && democont.length() > 0) {
					for (int i = 0, size = democont.length(); i < size; i++) {
						JSONObject plat = democont.optJSONObject(i);
						if (plat != null) {
							int snsplat = plat.optInt("snsplat", -1);
							String cont = plat.optString("cont");
							testText.put(snsplat, cont);
						}
					}
				}
			}
		} catch (Throwable t) {
			t.printStackTrace();
		}
	}

	public static String[] randomPic() {
//		String url = "http://git.oschina.net/alexyu.yxj/MyTmpFiles/raw/master/kmk_pic_fld/";
//		String urlSmall = "http://git.oschina.net/alexyu.yxj/MyTmpFiles/raw/master/kmk_pic_fld/small/";
//		String[] pics = new String[]{
//				"120.JPG",
//				"127.JPG",
//				"130.JPG",
//				"18.JPG",
//				"184.JPG",
//				"22.JPG",
//				"236.JPG",
//				"237.JPG",
//				"254.JPG",
//				"255.JPG",
//				"263.JPG",
//				"265.JPG",
//				"273.JPG",
//				"37.JPG",
//				"39.JPG",
//				"IMG_2219.JPG",
//				"IMG_2270.JPG",
//				"IMG_2271.JPG",
//				"IMG_2275.JPG",
//				"107.JPG"
//		};
//		int index = 0;
//		return new String[]{
//				url + pics[index],
//				urlSmall + pics[index],
//				url + pics[index + 1],
//				urlSmall + pics[index + 1],
//				url + pics[index + 2],
//				urlSmall + pics[index + 2],
//				url + pics[index + 3],
//				urlSmall + pics[index + 3],
//				url + pics[index + 4]
//		};
		return new String[]{
				PIC1,
				PIC2
		};
	}

	public String getFilePath() {
		if(TextUtils.isEmpty(filePath)){
			download();
		}
		Log.e("mob","test video path="+filePath);
		return filePath;
	}

	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}

	//#endif
	public static String actionToString(int action) {
		switch (action) {
			case Platform.ACTION_AUTHORIZING: {
				return "ACTION_AUTHORIZING";
			}
			case Platform.ACTION_GETTING_FRIEND_LIST: {
				return "ACTION_GETTING_FRIEND_LIST";
			}
			case Platform.ACTION_FOLLOWING_USER: {
				return "ACTION_FOLLOWING_USER";
			}
			case Platform.ACTION_SENDING_DIRECT_MESSAGE: {
				return "ACTION_SENDING_DIRECT_MESSAGE";
			}
			case Platform.ACTION_TIMELINE: {
				return "ACTION_TIMELINE";
			}
			case Platform.ACTION_USER_INFOR: {
				return "ACTION_USER_INFOR";
			}
			case Platform.ACTION_SHARE: {
				return "ACTION_SHARE";
			}
			default: {
				return "UNKNOWN";
			}
		}
	}

	public Bitmap getImageBmp() {
		return imageBmp;
	}

	public String getMusicPath() {
		if(TextUtils.isEmpty(musicPath)){
			download();
		}
		return musicPath;
	}

	public void setImageBmp(Bitmap imageBmp) {
		this.imageBmp = imageBmp;
	}

	public String[] getImgArrays() {
		if(imgArrays == null){
			imgArrays = new String []{};
		}
		return imgArrays;
	}

	public void setImgArrays(String[] imgArrays) {
		this.imgArrays = imgArrays;
	}
} public class LittleredbookShare {

	public static final int LITTLEREDBOOK_IMAGE = 0x1594;
	public static final int LITTLEREDBOOK_VIDEO = 0x1595;

	private PlatformActionListener platformActionListener;

	public LittleredbookShare(PlatformActionListener listener) {
		this.platformActionListener = listener;
	}

	public void shareVideo(Activity activity) {
		openVideo(activity);
	}

	private void openVideo(final Activity activity) {
		AlertDialog.Builder builder = new AlertDialog.Builder(activity);
		builder.setMessage("请选择视频").setPositiveButton("视频", new DialogInterface.OnClickListener() {
			@Override
			public void onClick(DialogInterface dialog, int which) {
				Intent intent = new Intent(Intent.ACTION_PICK);
				intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "video/*");
				activity.startActivityForResult(intent, LITTLEREDBOOK_VIDEO);

			}
		});
		AlertDialog dialog = builder.create();
		dialog.show();
	}

	public void shareVideo(Activity activity, Uri uri) {
		Platform platform = ShareSDK.getPlatform(Littleredbook.NAME);
		Platform.ShareParams shareParams = new Platform.ShareParams();
		shareParams.setVideoUri(uri);
		shareParams.setShareType(Platform.SHARE_VIDEO);
		shareParams.setActivity(activity);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}




	public void shareImage(Activity activity) {
		openImage(activity);
	}

	private void openImage(final Activity activity) {
		AlertDialog.Builder builder = new AlertDialog.Builder(activity);
		builder.setMessage("请选择图片").setPositiveButton("图片", new DialogInterface.OnClickListener() {
			@Override
			public void onClick(DialogInterface dialog, int which) {
				Intent intent = new Intent(Intent.ACTION_PICK);
				intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "image/*");
				activity.startActivityForResult(intent, LITTLEREDBOOK_IMAGE);
			}
		});
		AlertDialog dialog = builder.create();
		dialog.show();
	}

	public void shareImagePath(Activity activity, String imagePath) {
		Platform douyin = ShareSDK.getPlatform(Littleredbook.NAME);
		Platform.ShareParams sp = new Platform.ShareParams();
		sp.setImagePath(imagePath);
		sp.setShareType(Platform.SHARE_IMAGE);
		sp.setActivity(activity);
		douyin.setPlatformActionListener(platformActionListener);
		douyin.share(sp);
	}

} public class AlipayShare {

	private PlatformActionListener platformActionListener;

	public AlipayShare(PlatformActionListener mListener){
		this.platformActionListener = mListener;
		DemoUtils.isValidClient("com.eg.android.AlipayGphone");
	}

	public void shareText(){
		Platform platform = ShareSDK.getPlatform(Alipay.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setShareType(Platform.SHARE_TEXT);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareImage(){
		Platform platform = ShareSDK.getPlatform(Alipay.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setImageData(ResourcesManager.getInstace(MobSDK.getContext()).getImageBmp());
		shareParams.setShareType(Platform.SHARE_IMAGE);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareWebPage(){
		Platform platform = ShareSDK.getPlatform(Alipay.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(LINK_TEXT);
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setUrl(LINK_URL);
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setImageData(ResourcesManager.getInstace(MobSDK.getContext()).getImageBmp());
		shareParams.setShareType(Platform.SHARE_WEBPAGE);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareText(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(Alipay.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setShareType(Platform.SHARE_TEXT);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareImage(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(Alipay.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setImageData(ResourcesManager.getInstace(MobSDK.getContext()).getImageBmp());
		shareParams.setShareType(Platform.SHARE_IMAGE);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareWebPage(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(Alipay.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setImageData(ResourcesManager.getInstace(MobSDK.getContext()).getImageBmp());
		shareParams.setShareType(Platform.SHARE_WEBPAGE);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}
} public class AlipayMomentsShare {

	private PlatformActionListener platformActionListener;

	public AlipayMomentsShare(PlatformActionListener platformActionListener) {
		this.platformActionListener = platformActionListener;
		DemoUtils.isValidClient("com.eg.android.AlipayGphone");
	}

	public void shareWebPage() {
		Platform platform = ShareSDK.getPlatform(Alipay.NAME);
		Platform.ShareParams shareParams = new Platform.ShareParams();
		shareParams.setText("test only Test test hahahahah");
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setImageData(ResourcesManager.getInstace(MobSDK.getContext()).getImageBmp());
		shareParams.setShareType(Platform.SHARE_WEBPAGE);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareWebPage(PlatformActionListener mListener) {
		Platform platform = ShareSDK.getPlatform(Alipay.NAME);
		Platform.ShareParams shareParams = new Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setImageData(ResourcesManager.getInstace(MobSDK.getContext()).getImageBmp());
		shareParams.setShareType(Platform.SHARE_WEBPAGE);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}
} public class DingdingShare {
	private PlatformActionListener platformActionListener;

	public DingdingShare(PlatformActionListener mListener){
		this.platformActionListener = mListener;
		DemoUtils.isValidClient("com.alibaba.android.rimet");
	}

	public void shareText(){
		Platform platform = ShareSDK.getPlatform(Dingding.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setShareType(Platform.SHARE_TEXT);
		shareParams.setScence(0);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareImage(){
		Platform platform = ShareSDK.getPlatform(Dingding.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setImageData(ResourcesManager.getInstace(MobSDK.getContext()).getImageBmp());
		shareParams.setShareType(Platform.SHARE_IMAGE);
		shareParams.setScence(0);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareWebPage(){
		Platform platform = ShareSDK.getPlatform(Dingding.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setUrl(LINK_URL);
		shareParams.setShareType(Platform.SHARE_WEBPAGE);
		shareParams.setScence(0);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}


	public void shareText(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(Dingding.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setShareType(Platform.SHARE_TEXT);
		shareParams.setScence(0);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareImage(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(Dingding.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setImageData(ResourcesManager.getInstace(MobSDK.getContext()).getImageBmp());
		shareParams.setShareType(Platform.SHARE_IMAGE);
		shareParams.setScence(0);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareWebPage(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(Dingding.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		shareParams.setShareType(Platform.SHARE_WEBPAGE);
		shareParams.setScence(0);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

} public class DouyinShare {

    public static final int PHOTO_REQUEST_GALLERY = 10;
    public static final int DOUYIN_VIDEO = 11;

    private PlatformActionListener platformActionListener;

    public DouyinShare(PlatformActionListener listener) {
        this.platformActionListener = listener;
    }

    public void shareVideo(Activity activity) {
        openSystemGallery(activity, DOUYIN_VIDEO);
    }

    public void shareVideo(Activity activity, String[] videoPath) {
        Platform platform = ShareSDK.getPlatform(Douyin.NAME);
        Platform.ShareParams shareParams = new Platform.ShareParams();
//        shareParams.setFilePath(videoPath);
        shareParams.setVideoPathArray(videoPath);
        shareParams.setShareType(Platform.SHARE_VIDEO);
        shareParams.setActivity(activity);
        shareParams.setHashtags(new String[]{"yyh","yyh2"});
        platform.setPlatformActionListener(platformActionListener);
        platform.share(shareParams);
    }

    public void shareImage(Activity activity) {
        openSystemGallery(activity);
    }

    public void shareImagePath(Activity activity, String imagePath) {
        Platform douyin = ShareSDK.getPlatform(Douyin.NAME);
        Platform.ShareParams sp = new Platform.ShareParams();
//        sp.setImagePath(imagePath);
        sp.setImageArray(new String[]{imagePath});
        sp.setShareType(Platform.SHARE_IMAGE);
        sp.setActivity(activity);
        sp.setHashtags(new String[]{});
        douyin.setPlatformActionListener(platformActionListener);
        douyin.share(sp);
    }


    private void openSystemGallery(final Activity activity, final int shareType) {
        AlertDialog.Builder builder = new AlertDialog.Builder(activity);
        builder.setMessage("请选择视频").setPositiveButton("视频", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                Intent intent = new Intent(Intent.ACTION_PICK);
                intent.setType("video/*");
                intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
                activity.startActivityForResult(intent, shareType);
            }
        });
        AlertDialog dialog = builder.create();
        dialog.show();
    }

    private void openSystemGallery(final Activity activity) {
        AlertDialog.Builder builder = new AlertDialog.Builder(activity);
        builder.setMessage("请选择图片").setPositiveButton("图片", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                Intent intent = new Intent(Intent.ACTION_PICK);
                intent.setType("image/*");
                intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
                //startActivityForResult(intent, PHOTO_REQUEST_GALLERY);
                activity.startActivityForResult(intent, PHOTO_REQUEST_GALLERY);
            }
        });
        AlertDialog dialog = builder.create();
        dialog.show();
    }


} public class EvernoteShare {

	private PlatformActionListener platformActionListener;

	public EvernoteShare(PlatformActionListener mListener) {
		this.platformActionListener = mListener;
	}

	public void shareVideo() {
			Platform platform = ShareSDK.getPlatform(Evernote.NAME);
			Platform.ShareParams shareParams = new Platform.ShareParams();
			shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
			shareParams.setShareType(Platform.SHARE_VIDEO);
			platform.setPlatformActionListener(platformActionListener);
			platform.share(shareParams);
	}

	public void shareText() {
		Platform platform = ShareSDK.getPlatform(Evernote.NAME);
		Platform.ShareParams shareParams = new Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setShareType(Platform.SHARE_TEXT);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareImage() {
			Platform platform = ShareSDK.getPlatform(Evernote.NAME);
			Platform.ShareParams shareParams = new Platform.ShareParams();
			shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
			shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
			shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
			shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
			shareParams.setShareType(Platform.SHARE_IMAGE);
			platform.setPlatformActionListener(platformActionListener);
			platform.share(shareParams);
	}

	public void shareVideo(PlatformActionListener mListener) {
		Platform platform = ShareSDK.getPlatform(Evernote.NAME);
		Platform.ShareParams shareParams = new Platform.ShareParams();
		shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setShareType(Platform.SHARE_VIDEO);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareTextImage(PlatformActionListener mListener) {
		Platform platform = ShareSDK.getPlatform(Evernote.NAME);
		Platform.ShareParams shareParams = new Platform.ShareParams();
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setTags(ResourcesManager.TAGS);
		shareParams.setStack(ResourcesManager.STACK);
		shareParams.setNotebook(ResourcesManager.NOTEBOOK);
		shareParams.setPublic(ResourcesManager.IS_PUBLIC);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

} public class FacebookShare {
	public static final int FACEBOOK_VIDEO = 0X0520;

	private PlatformActionListener platformActionListener;

	public FacebookShare(PlatformActionListener mListener) {
		this.platformActionListener = mListener;
	}

	public void shareImage() {
		try {
			final Platform platform = ShareSDK.getPlatform(Facebook.NAME);
			if (platform.isClientValid()) {
				//使用原生SDK分享Facebook
				Thread thread = new Thread() {
					@Override
					public void run() {
						super.run();
						try {
							String path = BitmapHelper.downloadBitmap(MobSDK.getContext(), "http://pic28.photophoto.cn/20130818/0020033143720852_b.jpg");
							Log.d("ShareSDK", "path: " + path);

							Platform.ShareParams shareParams = new Platform.ShareParams();
							shareParams.setImagePath(path);
							shareParams.setHashtag("Test Share Image HashTag");
							shareParams.setShareType(Platform.SHARE_IMAGE);
							platform.setPlatformActionListener(platformActionListener);
							platform.share(shareParams);
						} catch (Throwable t) {
							Log.d("ShareSDK", "catch:  " + t);
						}
					}
				};
				thread.start();

			} else {
				Platform.ShareParams shareParams = new Platform.ShareParams();
				shareParams.setText("elseelsetestesdfsdttwetwe");
				shareParams.setUrl("http://pic28.photophoto.cn/20130818/0020033143720852_b.jpg");
				platform.setPlatformActionListener(platformActionListener);
				platform.share(shareParams);
			}
		} catch (Throwable t) {
			Log.e("ShareSDK", "FacebookShare shareImage catch: " + t);
			Toast.makeText(MobSDK.getContext(), t.getMessage(), Toast.LENGTH_LONG).show();
		}
	}

	public void shareVideo(Activity activity) {
		openVideo(activity);
	}

	private void openVideo(final Activity activity) {
		try {
			AlertDialog.Builder builder = new AlertDialog.Builder(activity);
			builder.setMessage("请选择视频").setPositiveButton("视频", new DialogInterface.OnClickListener() {
				@Override
				public void onClick(DialogInterface dialog, int which) {
					Intent intent = new Intent(Intent.ACTION_PICK);
					intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "video/*");
					activity.startActivityForResult(intent, FACEBOOK_VIDEO);

				}
			});
			AlertDialog dialog = builder.create();
			dialog.show();
		} catch (Throwable t) {
			Log.e("QQQ", " Facebook Open video catch " + t);
		}
	}

	public void shareFacebookVideo(Uri videoUri) {
		try {
			Platform platform = ShareSDK.getPlatform(Facebook.NAME);
			if (platform.isClientValid()) {
				Platform.ShareParams shareParams = new Platform.ShareParams();
				shareParams.setVideoUri(videoUri);
				shareParams.setHashtag("Test share HashTag for video");
				shareParams.setShareType(Platform.SHARE_VIDEO);
				platform.setPlatformActionListener(platformActionListener);
				platform.share(shareParams);
			} else {
				Toast.makeText(MobSDK.getContext(),
						" Web Share not support share video", Toast.LENGTH_LONG).show();
			}
		} catch (Throwable t) {
			Log.e("ShareSDK", "shareFacebookVideo catch: " + t);
			Toast.makeText(MobSDK.getContext(), t.getMessage(), Toast.LENGTH_LONG).show();
		}

	}

	public void shareWebPage() {
		try {
			Platform platform = ShareSDK.getPlatform(Facebook.NAME);
			Platform.ShareParams shareParams = new Platform.ShareParams();
			shareParams.setUrl("https://developers.facebook.com");
			shareParams.setShareType(Platform.SHARE_WEBPAGE);
			shareParams.setQuote(LINK_TEXT);
			shareParams.setHashtag("测试话题分享");
			platform.setPlatformActionListener(platformActionListener);
			platform.share(shareParams);
		} catch (Throwable t) {
			Log.e("ShareSDK", "shareWebPage catch: " + t);
			Toast.makeText(MobSDK.getContext(), t.getMessage(), Toast.LENGTH_LONG).show();
		}
	}

} public class FacebookMessengerShare {
	private PlatformActionListener platformActionListener;

	public FacebookMessengerShare(PlatformActionListener mListener){
		this.platformActionListener = mListener;
		DemoUtils.isValidClient("com.facebook.orca");
	}

	public void shareWebPage(){
		Platform platform = ShareSDK.getPlatform(FacebookMessenger.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(LINK_TEXT);
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setUrl(LINK_URL);
		shareParams.setShareType(Platform.SHARE_WEBPAGE);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareImage(){
		Platform platform = ShareSDK.getPlatform(FacebookMessenger.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
//		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageArray(ResourcesManager.getInstace(MobSDK.getContext()).randomPic());
		shareParams.setShareType(Platform.SHARE_IMAGE);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareWebPage(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(FacebookMessenger.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		shareParams.setShareType(Platform.SHARE_WEBPAGE);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareImage(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(FacebookMessenger.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageArray(ResourcesManager.getInstace(MobSDK.getContext()).randomPic());
		shareParams.setShareType(Platform.SHARE_IMAGE);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}
	public void shareText(){
		Platform platform = ShareSDK.getPlatform(FacebookMessenger.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText("http://ahmn.t4m.cn/ziqMNf " +"loopShare 重磅上线！一键实现分享闭环！错过它，就错过了全世界~  ahmn.t4m.cn/ziqMNf 点击立即使用");
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setShareType(Platform.SHARE_TEXT);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}
	public void shareVideo(){
		Platform platform = ShareSDK.getPlatform(FacebookMessenger.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
		shareParams.setShareType(Platform.SHARE_VIDEO);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}
} public class InstagramShare {
	public static final int INS_PHOTO = 21;

	private PlatformActionListener platformActionListener;

	public InstagramShare(PlatformActionListener mListener){
		this.platformActionListener = mListener;
		DemoUtils.isValidClient("com.instagram.android");
	}

	public void shareText() {
		Platform qqq = ShareSDK.getPlatform(Instagram.NAME);
		Platform.ShareParams sp = new Platform.ShareParams();
		sp.setTitle("title");
		sp.setText("text");
		sp.setShareType(Platform.INSTAGRAM_FRIEND);
		qqq.setPlatformActionListener(platformActionListener);
		qqq.share(sp);
	}

	public void shareTextImage(Activity activity){
		//openSystemGallery(activity);
		Platform platform = ShareSDK.getPlatform(Instagram.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText("Ins share test");
		shareParams.setImageUrl(IMAGE_TEST_URL);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);

	}

	public void shareInsImage(String path) {
		Platform platform = ShareSDK.getPlatform(Instagram.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText("Ins share test");
		//shareParams.setImagePath(path);
		//Log.e("QQQ", " ins选择的图片 " + path);
		shareParams.setImageUrl(IMAGE_TEST_URL);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	private void openSystemGallery(final Activity activity) {
		AlertDialog.Builder builder = new AlertDialog.Builder(activity);
		builder.setMessage("请选择图片").setPositiveButton("图片", new DialogInterface.OnClickListener() {
			@Override
			public void onClick(DialogInterface dialog, int which) {
				Intent intent = new Intent(Intent.ACTION_PICK);
				intent.setType("image/*");
				intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
				//startActivityForResult(intent, PHOTO_REQUEST_GALLERY);
				activity.startActivityForResult(intent, INS_PHOTO);
			}
		});
		AlertDialog dialog = builder.create();
		dialog.show();
	}

	public void shareVideo(){
		Platform platform = ShareSDK.getPlatform(Instagram.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
		//TODO
		Log.e("WWW", " INS分享视频的路径 " + ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
		shareParams.setShareType(Platform.SHARE_VIDEO);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}
} public class InstapaperShare {
	private PlatformActionListener platformActionListener;

	public InstapaperShare(PlatformActionListener mListener){
		this.platformActionListener = mListener;
	}
	public void shareTextUrl(){
		Platform platform = ShareSDK.getPlatform(Instapaper.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setTitle("test title");
		shareParams.setText("test text");
		shareParams.setUrl("www.cctv.com");
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}



} public class KakaoStoryShare {
	private PlatformActionListener platformActionListener;

	public KakaoStoryShare(PlatformActionListener mListener){
		this.platformActionListener = mListener;
		DemoUtils.isValidClient("com.kakao.story");
	}

	public void shareText(){
		Platform platform = ShareSDK.getPlatform(KakaoStory.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(LINK_TEXT);
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setSite(ResourcesManager.getInstace(MobSDK.getContext()).getSite());
		shareParams.setUrl(LINK_URL);
		shareParams.setComment(ResourcesManager.getInstace(MobSDK.getContext()).getComment());
		shareParams.setComment(ResourcesManager.getInstace(MobSDK.getContext()).getComment());
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareImage(){
		Platform platform = ShareSDK.getPlatform(KakaoStory.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setShareType(Platform.SHARE_IMAGE);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
//		shareImageLocal();
	}
	public void shareImageLocal(){
		Platform platform = ShareSDK.getPlatform(KakaoStory.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setShareType(Platform.SHARE_IMAGE);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareVideo(){
		Platform platform = ShareSDK.getPlatform(KakaoStory.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setShareType(Platform.SHARE_VIDEO);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareText(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(KakaoStory.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setSite(ResourcesManager.getInstace(MobSDK.getContext()).getSite());
		shareParams.setComment(ResourcesManager.getInstace(MobSDK.getContext()).getComment());
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareImage(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(KakaoStory.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setShareType(Platform.SHARE_IMAGE);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareVideo(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(KakaoStory.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setShareType(Platform.SHARE_VIDEO);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}
} public class KakaoTalkShare {
	private PlatformActionListener platformActionListener;

	public KakaoTalkShare(PlatformActionListener mListener){
		this.platformActionListener = mListener;
		DemoUtils.isValidClient("com.kakao.talk");
	}

	public void shareText(){
		Platform platform = ShareSDK.getPlatform(KakaoTalk.NAME);
		Platform.ShareParams sp = new Platform.ShareParams();
		sp.setText("kakao Text share Test");
		sp.setShareType(Platform.KAKAO_TEXT_TEMPLATE);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(sp);
	}


	public void shareUrl() {
		Platform platform = ShareSDK.getPlatform(KakaoTalk.NAME);
		Platform.ShareParams sp = new Platform.ShareParams();
		sp.setShareType(Platform.KAKAO_URL_TEMPLATE);
		sp.setUrl("https://www.baidu.com");
		platform.setPlatformActionListener(platformActionListener);
		platform.share(sp);
	}

	/**
	 * KAKAO_FEED_TEMPLATE
	 * **/
	public void kakaoFeedShare() {
		Platform platform = ShareSDK.getPlatform(KakaoTalk.NAME);
		Platform.ShareParams sp = new Platform.ShareParams();
		sp.setShareType(Platform.KAKAO_FEED_TEMPLATE);
		sp.setTitle("kakao title");
		sp.setImageUrl("https://cdn.pixabay.com/photo/2019/08/08/11/33/stingray-4392776_960_720.jpg");
		sp.setKakaoWebUrl("https://developers.kakao.com");
		sp.setKakaoMobileWebUrl("https://developers.kakao.com");
		sp.setText("descrption");
		sp.setKakaoLikecount(286);
		sp.setKakaoCommentcount(45);
		sp.setKakaoSharecount(845);
		sp.setKakaoAddbuttonTitle("button01 title");
		sp.setKakaoAddbuttonWeburl("https://www.baidu.com");
		sp.setKakaoAddbuttonMobileweburl("https://www.mob.com");
		platform.setPlatformActionListener(platformActionListener);
		platform.share(sp);
	}


	/**
	 * commerceTemplate
	 * **/
	public void kakaoCommerceShare() {
		Platform platform = ShareSDK.getPlatform(KakaoTalk.NAME);
		Platform.ShareParams sp = new Platform.ShareParams();
		sp.setShareType(Platform.KAKAO_COMMERCE_TEMPLATE);
		sp.setTitle("신메뉴 출시️ 체리블라썸라떼");
		sp.setImageUrl("https://cdn.pixabay.com/photo/2019/08/08/11/33/stingray-4392776_960_720.jpg");
		sp.setKakaoWebUrl("https://developers.kakao.com");
		sp.setKakaoMobileWebUrl("https://developers.kakao.com");
		sp.setText("이번 주는 체리블라썸라떼 1+1");
		sp.setKakaoRegularprice(12345);
		sp.setKakaoProductname("체리블라썸라떼 1+1");
		sp.setKakaoDiscountprice(10000);
		sp.setKakaoDiscountrate(20);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(sp);
	}

	/**
	 *  customTemplate
	 * **/
	public void kakaoCustomShare() {
		HashMap<String, String> templateArgs = new HashMap<String, String>();
		templateArgs.put("${title}", "프로방스 자동차 여행");
		templateArgs.put("${description}", "매년 7~8월에 프로방스 발랑솔을 중심으로 라벤더가 만개한다. " +
				"이 길을 라벤더로드라고 하며 라벤더와 해바라기 밭이 가득찬 풍경을 어디서나 볼 수 있다.");

		Platform platform = ShareSDK.getPlatform(KakaoTalk.NAME);
		Platform.ShareParams sp = new Platform.ShareParams();
		sp.setKakaoCustomTemplateId("11818");
		sp.setKakaoCustomTemplate(templateArgs);
		sp.setShareType(Platform.KAKAO_CUSTOM_TEMPLATE);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(sp);
	}


} public class KuaishouShare {

	public static final int KUAISHOU_IMAGE = 0x1592;
	public static final int KUAISHOU_VIDEO = 0x1593;

	private PlatformActionListener platformActionListener;

	public KuaishouShare(PlatformActionListener listener) {
		this.platformActionListener = listener;
	}

	public void shareVideo(Activity activity) {
		openVideo(activity);
	}

	private void openVideo(final Activity activity) {
		AlertDialog.Builder builder = new AlertDialog.Builder(activity);
		builder.setMessage("请选择视频").setPositiveButton("视频", new DialogInterface.OnClickListener() {
			@Override
			public void onClick(DialogInterface dialog, int which) {
				Intent intent = new Intent(Intent.ACTION_PICK);
				intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "video/*");
				activity.startActivityForResult(intent, KUAISHOU_VIDEO);

			}
		});
		AlertDialog dialog = builder.create();
		dialog.show();
	}

	public void shareVideo(Activity activity, Uri uri) {
		Platform platform = ShareSDK.getPlatform(Kuaishou.NAME);
		Platform.ShareParams shareParams = new Platform.ShareParams();
		//shareParams.setVideoUri(uri);
		shareParams.setFilePath(UriUtil.convertUriToPath(MobSDK.getContext(), uri));
		shareParams.setShareType(Platform.SHARE_VIDEO);
		shareParams.setActivity(activity);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}



	public void shareImage(Activity activity) {
		openImage(activity);
	}

	private void openImage(final Activity activity) {
		AlertDialog.Builder builder = new AlertDialog.Builder(activity);
		builder.setMessage("请选择图片").setPositiveButton("图片", new DialogInterface.OnClickListener() {
			@Override
			public void onClick(DialogInterface dialog, int which) {
				Intent intent = new Intent(Intent.ACTION_PICK);
				intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "image/*");
				activity.startActivityForResult(intent, KUAISHOU_IMAGE);
			}
		});
		AlertDialog dialog = builder.create();
		dialog.show();
	}

	public void shareImagePath(Activity activity, String imagePath) {
		Platform douyin = ShareSDK.getPlatform(Kuaishou.NAME);
		Platform.ShareParams sp = new Platform.ShareParams();
		sp.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		sp.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		sp.setImagePath(imagePath);
		sp.setShareType(Platform.SHARE_IMAGE);
		sp.setActivity(activity);
		douyin.setPlatformActionListener(platformActionListener);
		douyin.share(sp);
	}

	public void shareWebPage(final Activity activity) {
		final Platform platform = ShareSDK.getPlatform(Kuaishou.NAME);
		if (null == platform || null == activity) {
			return;
		}
		ThreadPoolUtils.execute(new Runnable() {
			@Override
			public void run() {
				Platform.ShareParams shareParams = new  Platform.ShareParams();
				shareParams.setText("text");//length<=1024
				shareParams.setTitle("title");//length<=512
				shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
				try {
					Bitmap bitmap = BitmapFactory.decodeResource(activity.getResources(), R.mipmap.ic_launcher);
					shareParams.setImageData(bitmap);//length<=65536
				} catch (Throwable throwable) {
					throwable.printStackTrace();
				}
				shareParams.setActivity(activity);
				shareParams.setShareType(Platform.SHARE_WEBPAGE);
				platform.setPlatformActionListener(platformActionListener);
				platform.share(shareParams);
			}
		});
	}
} public class LinkedinShare {
	private PlatformActionListener platformActionListener;

	public LinkedinShare(PlatformActionListener mListener){
		this.platformActionListener = mListener;
	}

	public void shareText(){
		Platform platform = ShareSDK.getPlatform(LinkedIn.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setComment(ResourcesManager.getInstace(MobSDK.getContext()).getComment());
		shareParams.setShareType(Platform.SHARE_TEXT);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareWebPage() {
		Platform platform = ShareSDK.getPlatform(LinkedIn.NAME);
		Platform.ShareParams shareParams = new Platform.ShareParams();
		shareParams.setTitle("asd title can not repeat");
		shareParams.setText("assf text str can not repeat");
		shareParams.setLinkedinDescription("asdg web descri can not repeat ");
		shareParams.setUrl(LINK_URL);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareImage(){
		Platform platform = ShareSDK.getPlatform(LinkedIn.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setComment(ResourcesManager.getInstace(MobSDK.getContext()).getComment());
		shareParams.setShareType(Platform.SHARE_IMAGE);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

} public class MeipaiShare {

	public static final int MEIPAI_IMAGE = 0x9739;
	public static final int MEIPAI_VIDEO = 0x2847;

	private PlatformActionListener platformActionListener;

	public MeipaiShare(PlatformActionListener mListener){
		this.platformActionListener = mListener;
		DemoUtils.isValidClient("com.meitu.meipaimv");
	}

	public void shareVideo(Activity activity) {
		openVideo(activity);
	}

	private void openVideo(final Activity activity) {
		AlertDialog.Builder builder = new AlertDialog.Builder(activity);
		builder.setMessage("请选择视频").setPositiveButton("视频", new DialogInterface.OnClickListener() {
			@Override
			public void onClick(DialogInterface dialog, int which) {
				Intent intent = new Intent(Intent.ACTION_PICK);
				intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "video/*");
				activity.startActivityForResult(intent, MEIPAI_VIDEO);

			}
		});
		AlertDialog dialog = builder.create();
		dialog.show();
	}

	public void shareVideo(Activity activity, String videoPath) {
		Platform platform = ShareSDK.getPlatform(Meipai.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setFilePath(videoPath);
		shareParams.setShareType(Platform.SHARE_VIDEO);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}


	public void shareImage(Activity activity) {
		openImage(activity);
	}

	private void openImage(final Activity activity) {
		AlertDialog.Builder builder = new AlertDialog.Builder(activity);
		builder.setMessage("请选择图片").setPositiveButton("图片", new DialogInterface.OnClickListener() {
			@Override
			public void onClick(DialogInterface dialog, int which) {
				Intent intent = new Intent(Intent.ACTION_PICK);
				intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "image/*");
				activity.startActivityForResult(intent, MEIPAI_IMAGE);
			}
		});
		AlertDialog dialog = builder.create();
		dialog.show();
	}

	public void shareImagePath(Activity activity, String imagePath) {
		Platform platform = ShareSDK.getPlatform(Meipai.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setImagePath(imagePath);
		shareParams.setShareType(Platform.SHARE_IMAGE);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

} public class MingdaoShare {
	private PlatformActionListener platformActionListener;

	public MingdaoShare(PlatformActionListener mListener){
		this.platformActionListener = mListener;
	}

	public void shareText(){
		Platform platform = ShareSDK.getPlatform(Mingdao.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setUrl(LINK_URL);
		shareParams.setText("shareText text text text hahahah");
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareImage(){
		Platform platform = ShareSDK.getPlatform(Mingdao.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText("shareText only test no mult and more");
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareImageText(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(Mingdao.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}
} public class OasisShare {

    public static final int OASIS_PHOTO_REQUEST_GALLERY = 13;
    public static final int OASIS_PHOTO_REQUEST_GALLERY_NET = 18;

    public static final int OASIS_SHARE_VIDEO = 17;

    private PlatformActionListener platformActionListener;

    public OasisShare(PlatformActionListener listener) {
        this.platformActionListener = listener;
    }

    public void shareListUri(List<Uri> uriList){
        Platform platform = ShareSDK.getPlatform(Oasis.NAME);
        Platform.ShareParams sp = new Platform.ShareParams();
        sp.setShareType(Platform.SHARE_IMAGE);
        sp.setTitle("测试sharesdk");
        sp.setComment("分享到新浪绿洲");
        Log.d("AndyOn", "uriList=="+uriList.toString());

        sp.setImageUriList(uriList);
        platform.setPlatformActionListener(platformActionListener);
        platform.share(sp);
    }

    public void shareListPath(List<String> pathList){
        Platform platform = ShareSDK.getPlatform(Oasis.NAME);
        Platform.ShareParams sp = new Platform.ShareParams();
        sp.setShareType(Platform.SHARE_IMAGE);
        sp.setTitle("测试sharesdk");
        sp.setComment("分享到新浪绿洲");
        sp.setImageUrlList(pathList);
        platform.setPlatformActionListener(platformActionListener);
        platform.share(sp);
    }

    public void shareVideo(Uri path){
        Platform platform = ShareSDK.getPlatform(Oasis.NAME);
        Platform.ShareParams sp = new Platform.ShareParams();
        sp.setShareType(Platform.SHARE_IMAGE);
        sp.setTitle("测试sharesdk");
        sp.setComment("分享到新浪绿洲");
        sp.setVideoUriOasis(path);
        platform.setPlatformActionListener(platformActionListener);
        platform.share(sp);
    }

    private void openSystemGallery(final Activity activity) {
        AlertDialog.Builder builder = new AlertDialog.Builder(activity);
        builder.setMessage("请选择图片").setPositiveButton("图片", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                Intent intent = new Intent(Intent.ACTION_PICK);
                intent.setType("image/*");
                intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
                //startActivityForResult(intent, PHOTO_REQUEST_GALLERY);
                activity.startActivityForResult(intent, OASIS_PHOTO_REQUEST_GALLERY);
            }
        });
        AlertDialog dialog = builder.create();
        dialog.show();
    }

    public void showDialogSelectImg(final Activity activity){
        android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(activity);
        builder.setMessage("添加相片")
                .setNegativeButton("网络图片的本地绝对路径", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        Intent intent = new Intent(Intent.ACTION_PICK);
                        intent.setType("image/*");
                        intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
                        //startActivityForResult(intent, PHOTO_REQUEST_GALLERY);
                        activity.startActivityForResult(intent, OASIS_PHOTO_REQUEST_GALLERY_NET);
                    }
                })
                .setPositiveButton("本地图片", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        Intent intent = new Intent(Intent.ACTION_PICK);
                        intent.setType("image/*");
                        intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
                        //startActivityForResult(intent, PHOTO_REQUEST_GALLERY);
                        activity.startActivityForResult(intent, OASIS_PHOTO_REQUEST_GALLERY);
                    }
                });
        android.app.AlertDialog dialog = builder.create();
        dialog.show();
    }

    public void shareVideo(final Activity activity){
        AlertDialog.Builder builder = new AlertDialog.Builder(activity);
        builder.setMessage("请选择视频").setPositiveButton("视频", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                Intent intent = new Intent(Intent.ACTION_PICK);
                intent.setType("video/*");
                intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
                activity.startActivityForResult(intent, OASIS_SHARE_VIDEO);
            }
        });
        AlertDialog dialog = builder.create();
        dialog.show();
    }

    public void shareImagePath(Activity activity, String imagePath) {
        Platform oasis = ShareSDK.getPlatform(Oasis.NAME);
        Platform.ShareParams sp = new Platform.ShareParams();
        sp.setImagePath(imagePath);
        sp.setShareType(Platform.SHARE_IMAGE);
        sp.setActivity(activity);
        oasis.setPlatformActionListener(platformActionListener);
        oasis.share(sp);
    }

} public class RedditShare {
    private PlatformActionListener platformActionListener;

    public RedditShare(PlatformActionListener mListener) {
        this.platformActionListener = mListener;
    }

    /** redit 其中的title不能为空，否则无法正确提交  **/
    public void shareText(){
        Platform reddit = ShareSDK.getPlatform(Reddit.NAME);
        Platform.ShareParams sp = new Platform.ShareParams();
        sp.setTitle("haha bu gao su ni , Title, please igonre, thank you................ 2020-03-23-1632");
        sp.setText("that's is ok all everything, thank you............... 2020-03-23-1632");
        sp.setSubreddit("AndroidWear");
        sp.setShareType(Platform.SHARE_TEXT);
        reddit.setPlatformActionListener(platformActionListener);
        reddit.share(sp);
    }

    /** 即时分享链接，setText也不能为空，虽然text并不会显示出来 **/
    public void shareUrl(){
        Platform reddit = ShareSDK.getPlatform(Reddit.NAME);
        Platform.ShareParams sp = new Platform.ShareParams();
        sp.setTitle("ok all but i am bu hao le ");
        sp.setText("shi jie hai hao ma ");
        sp.setSubreddit("Coronavirus");
        sp.setShareType(Platform.SHARE_WEBPAGE);
        sp.setUrl("https://www.mob.com/");
        reddit.setPlatformActionListener(platformActionListener);
        reddit.share(sp);
    }
    public void shareImage() {
        Platform platform = ShareSDK.getPlatform(Reddit.NAME);
        Platform.ShareParams shareParams = new Platform.ShareParams();
        shareParams.setSubreddit("aaa");
        shareParams.setTitle("分享链接");
        shareParams.setText("分享内容");
        String PIC1="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fcambrian-images.cdn.bcebos.com%2Fb5e7f938e8233fdbe343817b5a2610bb_1513843872877.jpeg";
        shareParams.setImageUrl(PIC1);
        shareParams.setShareType(Platform.SHARE_IMAGE);
        platform.setPlatformActionListener(platformActionListener);
        platform.share(shareParams);
    }
} public class RenrenShare {
	private PlatformActionListener platformActionListener;

	public RenrenShare(PlatformActionListener mListener){
		this.platformActionListener = mListener;
	}

	public void shareText(){
		Platform platform = ShareSDK.getPlatform(Renren.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText("ONLY TEST RENREN PLEASE IGNORE, THANKS, MORE SHARE WILL BE NO LOOK AT");
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareImage(){
		Platform platform = ShareSDK.getPlatform(Renren.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setComment("test test hhhhhhhh, REN geger PLEASE NO WATCH HAHAHA");
		shareParams.setImageUrl("http://pic28.photophoto.cn/20130818/0020033143720852_b.jpg");
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareFeed(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(Renren.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		shareParams.setComment(ResourcesManager.getInstace(MobSDK.getContext()).getComment());
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitleUrl(ResourcesManager.getInstace(MobSDK.getContext()).getTitleUrl());
		shareParams.setExtInfo(ResourcesManager.EXT_INFO);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}
} public class WeiboShare {
	private PlatformActionListener platformActionListener;

	public WeiboShare(PlatformActionListener mListener){
		this.platformActionListener = mListener;
	}

	public void shareText(){
		Platform platform = ShareSDK.getPlatform(SinaWeibo.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareImage(){
		Platform platform = ShareSDK.getPlatform(SinaWeibo.NAME);
		if (platform.isClientValid()) {
			Platform.ShareParams shareParams = new  Platform.ShareParams();
			if (ResourcesManager.getInstace(MobSDK.getContext()).getImagePath() == null) {
				shareParams.setImageUrl("http://pic28.photophoto.cn/20130818/0020033143720852_b.jpg");
			} else {
				shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
			}
			shareParams.setText("sina 分享 title");
			shareParams.setShareType(Platform.SHARE_IMAGE);
			shareParams.setLongitude(ResourcesManager.longitude);
			shareParams.setLatitude(ResourcesManager.latitude);
			platform.setPlatformActionListener(platformActionListener);
			platform.share(shareParams);
		} else {
			Platform.ShareParams shareParams = new  Platform.ShareParams();
			shareParams.setText("sina image and text share   http://pic28.photophoto.cn/20130818/0020033143720852_b.jpg");
			//shareParams.setImageUrl("http://pic28.photophoto.cn/20130818/0020033143720852_b.jpg");
			shareParams.setShareType(Platform.SHARE_IMAGE);
			platform.setPlatformActionListener(platformActionListener);
			platform.share(shareParams);
		}
	}

	public void shareVideo(){
		Platform platform = ShareSDK.getPlatform(SinaWeibo.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
		shareParams.setText("share");
		shareParams.setShareType(Platform.SHARE_VIDEO);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareText(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(SinaWeibo.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		if(!DemoUtils.isValidClientSina("com.sina.weibo")){
			shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		}
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareImage(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(SinaWeibo.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		if(!DemoUtils.isValidClientSina("com.sina.weibo")){
			shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		}
		shareParams.setLongitude(ResourcesManager.longitude);
		shareParams.setLatitude(ResourcesManager.latitude);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	/**
	 * 新浪linkcard分享
	 **/
	public void shareLinkCard() {
		JSONObject jsonObject = new JSONObject();
		try {
			jsonObject.put("url", "http://pic28.photophoto.cn/20130818/0020033143720852_b.jpg");
			jsonObject.put("width", 120);
			jsonObject.put("height", 120);
		} catch (JSONException e) {
			e.printStackTrace();
		}

		Platform platform = ShareSDK.getPlatform(SinaWeibo.NAME);
		Platform.ShareParams sp = new Platform.ShareParams();
		sp.setText("MobSDK 只为最优质的服务");
		sp.setLcCreateAt("2019-01-24");
		sp.setLcDisplayName("Mob-全球领先的第三方服务商");
		sp.setLcImage(jsonObject);
		sp.setLcSummary("不止是SDK");
		sp.setLcUrl("http://www.mob.com/");
		sp.setLcObjectType("webpage");
		platform.setPlatformActionListener(platformActionListener);
		platform.share(sp);
	}

} public class SnapChatShare {
    public static final int SNAP_IMAGE = 0x7628;
    public static final int SNAP_VIDEO = 0x2864;

    private PlatformActionListener platformActionListener;

    public SnapChatShare(PlatformActionListener listener) {
        this.platformActionListener = listener;
    }

    public void openSnapchatImage(Activity activity) {
        openSystemGallery(activity);
    }

    public void openSnapchatVideo(Activity activity) {
        openSystemGallery(activity);
    }

    private void openSystemGallery(final Activity activity) {
        AlertDialog.Builder builder = new AlertDialog.Builder(activity);
        builder.setMessage("请选择图片/视频").setPositiveButton("图片", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                Intent intent = new Intent(Intent.ACTION_PICK);
                intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "image/*");
                activity.startActivityForResult(intent, SNAP_IMAGE);
            }
        }).setNegativeButton("视频", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                Intent intent = new Intent(Intent.ACTION_PICK);
                intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "video/*");
                activity.startActivityForResult(intent, SNAP_VIDEO);
            }
        }).show();
    }

    /**
     * 分享图片 打开相册
     * **/
    public void shareSnapImageOpen(Activity activity) {
        openSnapchatImage(activity);
    }

    /**
     * Snapchat 分享图片
     **/
    public void shareSnapchatImageIntent(Activity activity, Intent data) {
        File mSnapFile = new File(activity.getCacheDir(), "snap");
        saveContentLocally(activity, data, mSnapFile);

        File mStickerFile = new File(activity.getCacheDir(), "sticker");
        if (!mStickerFile.exists()) {
            try {
                InputStream inputStream = activity.getAssets().open("sticker.png");
                copyFile(inputStream, mStickerFile);
            } catch (IOException e) {
                Toast.makeText(MobSDK.getContext(), "Failed to copy sticker asset", Toast.LENGTH_SHORT).show();
            }
        }

        Platform platform = ShareSDK.getPlatform(Snapchat.NAME);
        Platform.ShareParams shareParams = new Platform.ShareParams();
        shareParams.setFileImage(mSnapFile);
        shareParams.setFileSticker(mStickerFile);
        shareParams.setText("hahahahTestonly");
        shareParams.setUrl("https://www.baidu.com");
        shareParams.setShareType(Platform.SHARE_IMAGE);
        platform.setPlatformActionListener(new PlatformActionListener() {
            @Override
            public void onComplete(Platform platform, int action, HashMap<String, Object> res) {
                Log.e("QQQ", " onComplete " + res);
            }

            @Override
            public void onError(Platform platform, int action, Throwable t) {
                Log.e("QQQ", " onError " + t);
            }

            @Override
            public void onCancel(Platform platform, int action) {
                Log.e("QQQ", " onCancel ");
            }
        });
        platform.share(shareParams);

    }

    /**
     * 分享视频 打开相册
     * **/
    public void shareSnapVideoOpen(Activity activity) {
        openSnapchatImage(activity);
    }

    /**
     * Snapchat 分享视频
     **/
    public void shareSnapchatVideo(Activity activity, Intent data) {
        File mSnapFile = new File(activity.getCacheDir(), "snap");
        saveContentLocally(activity, data, mSnapFile);

        File mStickerFile = new File(activity.getCacheDir(), "sticker");
        if (!mStickerFile.exists()) {
            try {
                InputStream inputStream = activity.getAssets().open("sticker.png");
                copyFile(inputStream, mStickerFile);
            } catch (IOException e) {
                Toast.makeText(activity, "Failed to copy sticker asset", Toast.LENGTH_SHORT).show();
            }
        }

        Platform platform = ShareSDK.getPlatform(Snapchat.NAME);
        Platform.ShareParams shareParams = new Platform.ShareParams();
        shareParams.setFileVideo(mSnapFile);
        shareParams.setFileSticker(mStickerFile);
        shareParams.setText("hahahahTestonly");
        shareParams.setUrl("https://www.baidu.com");
        shareParams.setShareType(Platform.SHARE_VIDEO);
        platform.setPlatformActionListener(new PlatformActionListener() {
            @Override
            public void onComplete(Platform platform, int action, HashMap<String, Object> res) {
                Log.e("QQQ", " onComplete " + res);
            }

            @Override
            public void onError(Platform platform, int action, Throwable t) {
                Log.e("QQQ", " onError " + t);
            }

            @Override
            public void onCancel(Platform platform, int action) {
                Log.e("QQQ", " onCancel ");
            }
        });
        platform.share(shareParams);
    }


    private boolean saveContentLocally(Activity activity, Intent intent, File snapFile) {
        if (intent == null || intent.getData() == null) {
            return false;
        }
        InputStream inputStream;

        try {
            inputStream = activity.getContentResolver().openInputStream(intent.getData());
        } catch (FileNotFoundException e) {
            Toast.makeText(activity, "Could not open file", Toast.LENGTH_SHORT).show();
            return false;
        }
        if (inputStream == null) {
            Toast.makeText(MobSDK.getContext(), "File does not exist", Toast.LENGTH_SHORT).show();
            return false;
        }
        try {
            copyFile(inputStream, snapFile);
        } catch (IOException e) {
            Toast.makeText(MobSDK.getContext(), "Failed save file locally", Toast.LENGTH_SHORT).show();
            return false;
        }
        return true;
    }

    private static void copyFile(InputStream inputStream, File file) throws IOException {
        byte[] buffer = new byte[1024];
        int length;

        try {
            FileOutputStream outputStream = new FileOutputStream(file);
            while ((length = inputStream.read(buffer)) != -1) {
                outputStream.write(buffer, 0, length);
            }
        } catch (Throwable t) {
            Log.e("QQQ", "copyFile catch " + t);
        }
    }

} public class ShortMessageShare {
	private PlatformActionListener platformActionListener;

	public ShortMessageShare(PlatformActionListener mListener){
		this.platformActionListener = mListener;
	}

	public void shareText(){
		Platform platform = ShareSDK.getPlatform(ShortMessage.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
			shareParams.setText("http://ahmn.t4m.cn/ziqMNf " +"loopShare 重磅上线！一键实现分享闭环！错过它，就错过了全世界~  ahmn.t4m.cn/ziqMNf 点击立即使用");
//			shareParams.setText(LINK_URL);
		} else {
			shareParams.setText(LINK_URL);
		}
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareImage(){
		Platform platform = ShareSDK.getPlatform(ShortMessage.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareVideo(){
		Platform platform = ShareSDK.getPlatform(ShortMessage.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
		shareParams.setShareType(Platform.SHARE_VIDEO);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareImageText(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(ShortMessage.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareVideo(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(ShortMessage.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
		shareParams.setShareType(Platform.SHARE_VIDEO);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}
} public class TelegramShare {
	private PlatformActionListener platformActionListener;

	public TelegramShare(PlatformActionListener mListener){
		this.platformActionListener = mListener;
	}

	public void shareText(){
		Platform platform = ShareSDK.getPlatform(Telegram.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(LINK_TEXT);
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setUrl(LINK_URL);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}
	public void shareImage(){
		Platform platform = ShareSDK.getPlatform(Telegram.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		//shareParams.setImageArray(ResourcesManager.getInstace(MobSDK.getContext()).randomPic());
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}
} public class QQShare {
    private PlatformActionListener platformActionListener;

    public QQShare(PlatformActionListener mListener) {
        this.platformActionListener = mListener;
        String[] pks = {"com.tencent.mobileqq", "com.tencent.mobileqqi", "com.tencent.qqlite", "com.tencent.minihd.qq", "com.tencent.tim"};
        DemoUtils.isValidClient(pks);
    }

    public void shareWebPager() {
        Platform platform = ShareSDK.getPlatform(QQ.NAME);
        Platform.ShareParams shareParams = new Platform.ShareParams();
        shareParams.setText(LINK_TEXT);
        shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
        shareParams.setTitleUrl("http://download.sdk.mob.com/2021/01/25/16/16115618066761.02.html");
        shareParams.setShareType(Platform.SHARE_WEBPAGE);
        platform.setPlatformActionListener(platformActionListener);
        platform.share(shareParams);
    }

    public void shareImage() {
        Platform platform = ShareSDK.getPlatform(QQ.NAME);
        Platform.ShareParams shareParams = new Platform.ShareParams();
        //shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
        //Log.d("ShareSDK", " ImagePath " + ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
        shareParams.setImageUrl("http://pic28.photophoto.cn/20130818/0020033143720852_b.jpg");
        platform.setPlatformActionListener(platformActionListener);
        shareParams.setShareType(Platform.SHARE_IMAGE);
        platform.share(shareParams);
    }

    public void shareMusic() {
        Platform platform = ShareSDK.getPlatform(QQ.NAME);
        Platform.ShareParams shareParams = new Platform.ShareParams();
        shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
        shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
        shareParams.setTitleUrl(ResourcesManager.getInstace(MobSDK.getContext()).getTitleUrl());
        shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
        shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
        shareParams.setMusicUrl(ResourcesManager.getInstace(MobSDK.getContext()).getMusicUrl());
        shareParams.setShareType(Platform.SHARE_MUSIC);
        platform.setPlatformActionListener(platformActionListener);
        platform.share(shareParams);
    }


    public void shareMusic(PlatformActionListener mListener) {
        Platform platform = ShareSDK.getPlatform(QQ.NAME);
        Platform.ShareParams shareParams = new Platform.ShareParams();
        shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
        shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
        shareParams.setTitleUrl(ResourcesManager.getInstace(MobSDK.getContext()).getTitleUrl());
        shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
        shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
        shareParams.setMusicUrl(ResourcesManager.getInstace(MobSDK.getContext()).getMusicUrl());
        shareParams.setShareType(Platform.SHARE_MUSIC);
        platform.setPlatformActionListener(mListener);
        platform.share(shareParams);
    }

    public void shareQQMiniProgram() {
        Platform platform = ShareSDK.getPlatform(QQ.NAME);
        Platform.ShareParams shareParams = new Platform.ShareParams();
        shareParams.setText("QQ小程序");
        shareParams.setTitle("QQ互联");
        shareParams.setTitleUrl("http://www.qq.com/");
        shareParams.setImageUrl("http://www.3wyu.com/wp-content/uploads/6e0eaf15gy1fvr5tnm2dfj20f108gtad.jpg");
        shareParams.setShareType(Platform.QQ_MINI_PROGRAM);
        shareParams.setQQMiniProgramAppid("1108318575"); //官方的
        shareParams.setQQMiniProgramPath("page/share/index.html?share_name=QQ%E9%9F%B3%E4%B9%90&share_key=5aIqFGg&from=disk");
        shareParams.setQQMiniProgramType("");
        platform.setPlatformActionListener(platformActionListener);
        platform.share(shareParams);
    }


} public class QQZoneShare {
	private PlatformActionListener platformActionListener;
    public static final int QZONE_VIDEO = 10082;


	public QQZoneShare(PlatformActionListener mListener){
		this.platformActionListener = mListener;
		String [] pks = {"com.tencent.mobileqq","com.tencent.mobileqqi","com.tencent.qqlite","com.tencent.minihd.qq","com.tencent.tim"};
		DemoUtils.isValidClient(pks);
	}

	public void shareText(){
		Platform platform = ShareSDK.getPlatform(QZone.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText("Share SDK QQ空间文字分享");
		/*shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setTitleUrl(ResourcesManager.getInstace(MobSDK.getContext()).getTitleUrl());
		shareParams.setSite(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setSiteUrl(ResourcesManager.getInstace(MobSDK.getContext()).getTitleUrl());*/
		platform.setPlatformActionListener(platformActionListener);
		shareParams.setShareType(Platform.SHARE_TEXT);
		platform.share(shareParams);
	}

	public void shareWebPager(){
		Platform platform = ShareSDK.getPlatform(QZone.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(LINK_TEXT);
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setUrl(LINK_URL);
		shareParams.setTitleUrl(ResourcesManager.getInstace(MobSDK.getContext()).getTitleUrl());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setSite("ShareSDK test site");
		shareParams.setSiteUrl("https://www.mob.com");
		platform.setPlatformActionListener(platformActionListener);
		shareParams.setShareType(Platform.SHARE_WEBPAGE);
		platform.share(shareParams);
	}

	public void shareImage(){
		Platform platform = ShareSDK.getPlatform(QZone.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setImageArray(ResourcesManager.getInstace(MobSDK.getContext()).randomPic());
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setShareTencentWeibo(false);
		shareParams.setShareType(Platform.SHARE_IMAGE);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

    public void shareVideo(Activity activity) {
        openSystemGallery(activity, QZONE_VIDEO);
    }

    public void shareVideo(String videoPath){
        Platform platform = ShareSDK.getPlatform(QZone.NAME);
        Platform.ShareParams shareParams = new  Platform.ShareParams();
        shareParams.setFilePath(videoPath);
        Log.e("WWW", " 视频文件路径===》 " + videoPath);
        shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
        shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
        shareParams.setShareType(Platform.SHARE_VIDEO);
        platform.setPlatformActionListener(platformActionListener);
        platform.share(shareParams);
    }


    private void openSystemGallery(final Activity activity, final int shareType) {
        AlertDialog.Builder builder = new AlertDialog.Builder(activity);
        builder.setMessage("请选择视频").setPositiveButton("视频", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                Intent intent = new Intent(Intent.ACTION_PICK);
                intent.setType("video/*");
                intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
                activity.startActivityForResult(intent, shareType);
            }
        });
        AlertDialog dialog = builder.create();
        dialog.show();
    }

	public void shareText(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(QZone.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setTitleUrl(ResourcesManager.getInstace(MobSDK.getContext()).getTitleUrl());
		shareParams.setShareType(Platform.SHARE_TEXT);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareWebPager(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(QZone.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		shareParams.setShareType(Platform.SHARE_WEBPAGE);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareImage(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(QZone.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setShareType(Platform.SHARE_IMAGE);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareVideo(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(QZone.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
		shareParams.setShareType(Platform.SHARE_VIDEO);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareQQMiniProgram(Activity activity) {
		Platform platform = ShareSDK.getPlatform(QZone.NAME);
		Platform.ShareParams shareParams = new Platform.ShareParams();
		shareParams.setText("QQ小程序");
		shareParams.setTitle("QQ互联");
		shareParams.setTitleUrl("http://www.qq.com/");
		shareParams.setImageUrl("http://www.3wyu.com/wp-content/uploads/6e0eaf15gy1fvr5tnm2dfj20f108gtad.jpg");
		shareParams.setShareType(Platform.QQ_MINI_PROGRAM);
		shareParams.setQQMiniProgramAppid("1108318575");
		shareParams.setQQMiniProgramPath("page/share/index.html?share_name=QQ%E9%9F%B3%E4%B9%90&share_key=5aIqFGg&from=disk");
		shareParams.setQQMiniProgramType("");
		ShareSDK.setActivity(activity);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

} public class TiktokShare {
	public static final int KT_IMAGE = 0x1252;
	public static final int KT_VIDEO = 0x2961;

	private PlatformActionListener platformActionListener;


	public TiktokShare(PlatformActionListener listener) {
		this.platformActionListener = listener;
	}

	public void shareVideo(Activity activity) {
		openAlbumVideo(activity);
	}

	public void shareVideo(Activity activity, String[] videoPath) {
		Platform platform = ShareSDK.getPlatform(Tiktok.NAME);
		Platform.ShareParams shareParams = new Platform.ShareParams();
		shareParams.setVideoPathArray(videoPath);
		shareParams.setHashtags(new String[]{"a","b"});
		shareParams.setShareType(Platform.SHARE_VIDEO);
		shareParams.setActivity(activity);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}
	public void shareImage(Activity activity) {
		openAlbumImage(activity);
	}

	public void shareImagePath(Activity activity, String[] imagePath) {
		Platform tiktok = ShareSDK.getPlatform(Tiktok.NAME);
		Platform.ShareParams sp = new Platform.ShareParams();
		sp.setImageArray(imagePath);
		sp.setHashtags(new String[]{"a","b"});
		sp.setShareType(Platform.SHARE_IMAGE);
		sp.setActivity(activity);
		tiktok.setPlatformActionListener(platformActionListener);
		tiktok.share(sp);
	}

	/**
	 * 打开图片相册
	 **/
	private void openAlbumImage(final Activity activity) {
		AlertDialog.Builder builder = new AlertDialog.Builder(activity);
		builder.setMessage("请选择图片").setPositiveButton("图片", new DialogInterface.OnClickListener() {
			@Override
			public void onClick(DialogInterface dialog, int which) {
				Intent intent = new Intent(Intent.ACTION_PICK);
				intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "image/*");
				activity.startActivityForResult(intent, KT_IMAGE);
			}
		}).show();
	}

	/**
	 * 打开视频相册
	 **/
	private void openAlbumVideo(final Activity activity) {
		AlertDialog.Builder builder = new AlertDialog.Builder(activity);
		builder.setMessage("请选择视频").setPositiveButton("视频", new DialogInterface.OnClickListener() {
			@Override
			public void onClick(DialogInterface dialog, int which) {
				//Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Video.Media.EXTERNAL_CONTENT_URI);
				//intent.setDataAndType(MediaStore.Video.Media.EXTERNAL_CONTENT_URI, "video/*");
				//intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
				Intent intent = new Intent(Intent.ACTION_PICK);
				intent.setType("video/*");
//				intent.setAction(Intent.ACTION_GET_CONTENT);
				intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
				activity.startActivityForResult(intent, KT_VIDEO);
			}
		}).show();
	}

} public class TumblrShare {
	private PlatformActionListener platformActionListener;

	public TumblrShare(PlatformActionListener mListener){
		this.platformActionListener = mListener;
	}

	public void shareText(){
		Platform platform = ShareSDK.getPlatform(Tumblr.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setShareType(Platform.SHARE_TEXT);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareImage(){
		Platform platform = ShareSDK.getPlatform(Tumblr.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setShareType(Platform.SHARE_IMAGE);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareText(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(Tumblr.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareImage(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(Tumblr.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}
	public void shareWebPager() {
		Platform platform = ShareSDK.getPlatform(Tumblr.NAME);
		Platform.ShareParams shareParams = new Platform.ShareParams();
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		shareParams.setAuthor("author...");
		shareParams.setQuote("quote...");
		shareParams.setImageUrl(ResourcesManager.PIC1);
		shareParams.setShareType(Platform.SHARE_WEBPAGE);
		platform.share(shareParams);
	}
	public void shareMusic() {
		ThreadPoolUtils.execute(new Runnable() {
			@Override
			public void run() {
				String musicPath = null;
				try {
					musicPath = new NetworkHelper().downloadCache(MobSDK.getContext(), ResourcesManager.getInstace(MobSDK.getContext()).getMusicUrl(), "music", true, null);
				} catch (Throwable throwable) {
					Log.e("mob","download Music e="+throwable.getMessage());
				}
				Platform platform = ShareSDK.getPlatform(Tumblr.NAME);
				Platform.ShareParams shareParams = new Platform.ShareParams();
				shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
				if (!TextUtils.isEmpty(musicPath)) {
					shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getMusicPath());
				}else {
					shareParams.setMusicUrl(ResourcesManager.getInstace(MobSDK.getContext()).getMusicUrl());
				}
				shareParams.setShareType(Platform.SHARE_MUSIC);
				platform.setPlatformActionListener(platformActionListener);
				platform.share(shareParams);
			}
		});

	}
	public void shareVideo() {
		Platform platform = ShareSDK.getPlatform(Tumblr.NAME);
		Platform.ShareParams shareParams = new Platform.ShareParams();
		shareParams.setTitle("我喜欢的视频");
		shareParams.setUrl("https://www.youtube.com/watch?v=T6AsbTCejmg");
//		shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
		shareParams.setShareType(Platform.SHARE_VIDEO);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

} public class TwitterShare {
    private PlatformActionListener platformActionListener;
    public static final int TWITTER_VIDEO = 10009;
    private final String toast = "Please install twitter client";

    public TwitterShare(PlatformActionListener mListener) {
        this.platformActionListener = mListener;
    }

    public void shareText() {
        Platform platform = ShareSDK.getPlatform(Twitter.NAME);
        boolean install = platform.isClientValid();
        if (install) {
            Platform.ShareParams shareParams = new Platform.ShareParams();
            shareParams.setText("only test good shareText");
            platform.setPlatformActionListener(platformActionListener);
            platform.share(shareParams);
        } else {
            Toast.makeText(MobSDK.getContext(), toast, Toast.LENGTH_LONG).show();
        }
    }

    public void shareImage() {
        Platform platform = ShareSDK.getPlatform(Twitter.NAME);
        boolean install = platform.isClientValid();
        if (install) {
            Platform.ShareParams shareParams = new Platform.ShareParams();
            shareParams.setText("only test good shareImage");
            //shareParams.setImageArray(ResourcesManager.getInstace(MobSDK.getContext()).randomPic());
            //shareParams.setImageUrl(IMAGE_TEST_URL);
            String[] arr = new String[]{IMAGE_TEST_URL, IMAGE_TEST_URL_TWO};
            shareParams.setImageArray(arr);
            platform.setPlatformActionListener(platformActionListener);
            platform.share(shareParams);
        } else {
            Toast.makeText(MobSDK.getContext(), toast, Toast.LENGTH_LONG).show();
        }
    }

    public void shareVideo() {
        Platform platform = ShareSDK.getPlatform(Twitter.NAME);
        boolean install = platform.isClientValid();
        if (install) {
            Platform.ShareParams shareParams = new Platform.ShareParams();
            shareParams.setText("only test good shareVideo");
            String filePath = ResourcesManager.getInstace(MobSDK.getContext()).getFilePath();
            if (!TextUtils.isEmpty(filePath)) {
                shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
                Log.e("qqq", " twitter=====> " + ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
                shareParams.setShareType(Platform.SHARE_VIDEO);
                platform.setPlatformActionListener(platformActionListener);
                platform.share(shareParams);
            } else {
                Toast.makeText(MobSDK.getContext(), "网络不好，视频在DEMO初始化的时候没有下载成功，请重新启动应用下载。", Toast.LENGTH_LONG).show();
            }
        } else {
            Toast.makeText(MobSDK.getContext(), toast, Toast.LENGTH_LONG).show();
        }
    }

    public void shareText(PlatformActionListener mListener) {
        Platform platform = ShareSDK.getPlatform(Twitter.NAME);
        boolean install = platform.isClientValid();
        if (install) {
            Platform.ShareParams shareParams = new Platform.ShareParams();
            //shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
            shareParams.setText("only test good shareText shareText");
            platform.setPlatformActionListener(mListener);
            platform.share(shareParams);
        } else {
            Toast.makeText(MobSDK.getContext(), toast, Toast.LENGTH_LONG).show();
        }
    }

    public void shareImage(PlatformActionListener mListener) {
        Platform platform = ShareSDK.getPlatform(Twitter.NAME);
        boolean install = platform.isClientValid();
        if (install) {
            Platform.ShareParams shareParams = new Platform.ShareParams();
            //shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
            shareParams.setText("only test good shareImage shareImage");
            shareParams.setImageArray(ResourcesManager.getInstace(MobSDK.getContext()).randomPic());
            shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
            shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
            platform.setPlatformActionListener(mListener);
            platform.share(shareParams);
        } else {
            Toast.makeText(MobSDK.getContext(), toast, Toast.LENGTH_LONG).show();
        }
    }

//	public void shareVideo(PlatformActionListener mListener){
//		Platform platform = ShareSDK.getPlatform(Twitter.NAME);
//		Platform.ShareParams shareParams = new  Platform.ShareParams();
//		shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
//		shareParams.setShareType(Platform.SHARE_VIDEO);
//		platform.setPlatformActionListener(mListener);
//		platform.share(shareParams);
//	}


} public class VKontakteShare {
	private PlatformActionListener platformActionListener;

	public VKontakteShare(PlatformActionListener mListener){
		this.platformActionListener = mListener;
	}

	public void shareText(){
		Platform platform = ShareSDK.getPlatform(VKontakte.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
//		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
//		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
//		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareMessage(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(VKontakte.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		shareParams.setFriend(ResourcesManager.IS_FRIEND);
		shareParams.setLatitude(ResourcesManager.latitude);
		shareParams.setLongitude(ResourcesManager.longitude);
		shareParams.setGroupId(" ");
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareImage(){
		Platform platform = ShareSDK.getPlatform(VKontakte.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
//		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
//		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareWebPager(){
		Platform platform = ShareSDK.getPlatform(VKontakte.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}
} public class WatermelonvideoShare {

	public static final int WATERM_VIDEO = 0x1561;

	private PlatformActionListener platformActionListener;

	public WatermelonvideoShare(PlatformActionListener listener) {
		this.platformActionListener = listener;
	}

	public void shareVideo(Activity activity) {
		openVideo(activity);
	}

	private void openVideo(final Activity activity) {
		AlertDialog.Builder builder = new AlertDialog.Builder(activity);
		builder.setMessage("请选择视频").setPositiveButton("视频", new DialogInterface.OnClickListener() {
			@Override
			public void onClick(DialogInterface dialog, int which) {
				Intent intent = new Intent(Intent.ACTION_PICK);
				intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "video/*");
				activity.startActivityForResult(intent, WATERM_VIDEO);

			}
		});
		AlertDialog dialog = builder.create();
		dialog.show();
	}

	public void shareVideo(Activity activity, Uri uri) {
		Platform platform = ShareSDK.getPlatform(Watermelonvideo.NAME);
		Platform.ShareParams shareParams = new Platform.ShareParams();
		shareParams.setVideoUri(uri);
		shareParams.setShareType(Platform.SHARE_VIDEO);
		shareParams.setActivity(activity);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}


} public class WechatFavoriteShare {
	private PlatformActionListener platformActionListener;
	public static final int WECHAT_FAV_FILE = 00221;

	public WechatFavoriteShare(PlatformActionListener mListener){
		this.platformActionListener = mListener;
		DemoUtils.isValidClient("com.tencent.mm");
	}

	public void shareText(){
		Platform platform = ShareSDK.getPlatform(WechatFavorite.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setShareType(Platform.SHARE_TEXT);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareImage(){
		Platform platform = ShareSDK.getPlatform(WechatFavorite.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		if (ResourcesManager.getInstace(MobSDK.getContext()).getImagePath() == null) {
			shareParams.setImageUrl("http://pic28.photophoto.cn/20130818/0020033143720852_b.jpg");
		} else {
			shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		}
		shareParams.setShareType(Platform.SHARE_IMAGE);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareMusic(){
		Platform platform = ShareSDK.getPlatform(WechatFavorite.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		if (ResourcesManager.getInstace(MobSDK.getContext()).getImagePath() == null) {
			shareParams.setImageUrl("http://pic28.photophoto.cn/20130818/0020033143720852_b.jpg");
		} else {
			shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		}
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getMusicUrl());
//		shareParams.setMusicUrl(ResourcesManager.getInstace(MobSDK.getContext()).getMusicUrl());
		shareParams.setShareType(Platform.SHARE_MUSIC);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	/**
	 * url 视频连接
	 */
	public void shareVideo(){
		Platform platform = ShareSDK.getPlatform(WechatFavorite.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setUrl("http://www.mob.com/video/ShareSDK.mp4");
		if (ResourcesManager.getInstace(MobSDK.getContext()).getImagePath() == null) {
			shareParams.setImageUrl("http://pic28.photophoto.cn/20130818/0020033143720852_b.jpg");
		} else {
			shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		}
		shareParams.setShareType(Platform.SHARE_VIDEO);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}



	public void shareWebpager(){
		Platform platform = ShareSDK.getPlatform(WechatFavorite.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		shareParams.setImageData(ResourcesManager.getInstace(MobSDK.getContext()).getImageBmp());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setShareType(Platform.SHARE_WEBPAGE);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareFile(Activity activity){
		openSystemGallery(activity, WECHAT_FAV_FILE);
	}

	public void shareFile(String videoPath){
		Platform platform = ShareSDK.getPlatform(WechatFavorite.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setFilePath(videoPath);
		Log.e("WWW", " 收藏文件路径 " + ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setShareType(Platform.SHARE_FILE);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	private void openSystemGallery(final Activity activity, final int shareType) {
		AlertDialog.Builder builder = new AlertDialog.Builder(activity);
		builder.setMessage("请选择图片").setPositiveButton("图片", new DialogInterface.OnClickListener() {
			@Override
			public void onClick(DialogInterface dialog, int which) {
				Intent intent = new Intent(Intent.ACTION_PICK);
				intent.setType("image/*");
				intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
				//startActivityForResult(intent, PHOTO_REQUEST_GALLERY);
				activity.startActivityForResult(intent, shareType);
			}
		});
		AlertDialog dialog = builder.create();
		dialog.show();
	}

	public void shareText(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(WechatFavorite.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setShareType(Platform.SHARE_TEXT);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareImage(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(WechatFavorite.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setImageData(ResourcesManager.getInstace(MobSDK.getContext()).getImageBmp());
		shareParams.setShareType(Platform.SHARE_IMAGE);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareMusic(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(WechatFavorite.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		shareParams.setMusicUrl(ResourcesManager.getInstace(MobSDK.getContext()).getMusicUrl());
		shareParams.setShareType(Platform.SHARE_MUSIC);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareVideo(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(WechatFavorite.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setShareType(Platform.SHARE_VIDEO);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareWebpager(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(WechatFavorite.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		shareParams.setImageData(ResourcesManager.getInstace(MobSDK.getContext()).getImageBmp());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setShareType(Platform.SHARE_WEBPAGE);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareFile(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(WechatFavorite.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setShareType(Platform.SHARE_FILE);
		shareParams.setImageData(ResourcesManager.getInstace(MobSDK.getContext()).getImageBmp());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}
} public class WechatShare {

private PlatformActionListener platformActionListener;

	public WechatShare(PlatformActionListener mListener){
		this.platformActionListener = mListener;
		DemoUtils.isValidClient("com.tencent.mm");
	}

	public void shareText(){
		Platform platform = ShareSDK.getPlatform(Wechat.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setShareType(Platform.SHARE_TEXT);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareImage(){
		Platform platform = ShareSDK.getPlatform(Wechat.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setImageUrl(IMAGE_TEST_URL);
		//shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		//Log.e("WWW", "imagePath ===> " + ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setShareType(Platform.SHARE_IMAGE);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareMusic(){
		Platform platform = ShareSDK.getPlatform(Wechat.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(IMAGE_TEST_URL);
//		shareParams.setMusicUrl(ResourcesManager.getInstace(MobSDK.getContext()).getMusicUrl());
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getMusicUrl());
		shareParams.setShareType(Platform.SHARE_MUSIC);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareVideo(){
		Platform platform = ShareSDK.getPlatform(Wechat.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setUrl("http://www.mob.com/video/ShareSDK.mp4");
		shareParams.setImageUrl("http://pic28.photophoto.cn/20130818/0020033143720852_b.jpg");
		shareParams.setShareType(Platform.SHARE_VIDEO);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareWebpager(){
		Platform platform = ShareSDK.getPlatform(Wechat.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setUrl(LINK_URL);
		shareParams.setImageUrl("http://pic28.photophoto.cn/20130818/0020033143720852_b.jpg");
		shareParams.setShareType(Platform.SHARE_WEBPAGE);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

//	public void shareApps(){
//		Platform platform = ShareSDK.getPlatform(Wechat.NAME);
//		Platform.ShareParams shareParams = new  Platform.ShareParams();
//		shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
//		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
//		shareParams.setShareType(Platform.SHARE_APPS);
//		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
//		shareParams.setExtInfo(ResourcesManager.EXT_INFO);
//		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
//		platform.setPlatformActionListener(platformActionListener);
//		platform.share(shareParams);
//	}

	/**
	 * 不展示分享文件，因为微信有可能废弃这个API
	 * **/
	public void shareFile(){
		Platform platform = ShareSDK.getPlatform(Wechat.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(IMAGE_TEST_URL);
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setShareType(Platform.SHARE_FILE);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareEmoji(){
		Platform platform = ShareSDK.getPlatform(Wechat.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setImageUrl("http://pic28.photophoto.cn/20130818/0020033143720852_b.jpg");
		shareParams.setShareType(Platform.SHARE_EMOJI);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareMiniProgram(){
		Platform platform = ShareSDK.getPlatform(Wechat.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageData(ResourcesManager.getInstace(MobSDK.getContext()).getImageBmp());
		shareParams.setImageUrl("http://pic28.photophoto.cn/20130818/0020033143720852_b.jpg");
		shareParams.setShareType(Platform.SHARE_WXMINIPROGRAM);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareText(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(Wechat.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setShareType(Platform.SHARE_TEXT);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareImage(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(Wechat.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setImageData(ResourcesManager.getInstace(MobSDK.getContext()).getImageBmp());
		shareParams.setShareType(Platform.SHARE_IMAGE);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareMusic(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(Wechat.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		shareParams.setMusicUrl(ResourcesManager.getInstace(MobSDK.getContext()).getMusicUrl());
		shareParams.setShareType(Platform.SHARE_MUSIC);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareVideo(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(Wechat.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setUrl("http://www.mob.com/video/ShareSDK.mp4");
		if (ResourcesManager.getInstace(MobSDK.getContext()).getImagePath() == null) {
			shareParams.setImageUrl("http://pic28.photophoto.cn/20130818/0020033143720852_b.jpg");
		} else {
			shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		}
		shareParams.setScence(0);
		shareParams.setShareType(Platform.SHARE_VIDEO);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareWebpager(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(Wechat.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		shareParams.setImageData(ResourcesManager.getInstace(MobSDK.getContext()).getImageBmp());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setShareType(Platform.SHARE_WEBPAGE);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

//	public void shareApps(PlatformActionListener mListener){
//		Platform platform = ShareSDK.getPlatform(Wechat.NAME);
//		Platform.ShareParams shareParams = new  Platform.ShareParams();
//		shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
//		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
//		shareParams.setShareType(Platform.SHARE_APPS);
//		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
//		shareParams.setExtInfo(ResourcesManager.EXT_INFO);
//		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
//		platform.setPlatformActionListener(mListener);
//		platform.share(shareParams);
//	}

	public void shareFile(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(Wechat.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setShareType(Platform.SHARE_FILE);
		shareParams.setImageData(ResourcesManager.getInstace(MobSDK.getContext()).getImageBmp());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareEmoji(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(Wechat.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageData(ResourcesManager.getInstace(MobSDK.getContext()).getImageBmp());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setShareType(Platform.SHARE_EMOJI);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareMiniProgram(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(Wechat.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageData(ResourcesManager.getInstace(MobSDK.getContext()).getImageBmp());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setShareType(Platform.SHARE_WXMINIPROGRAM);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}
} public class WechatMomentsShare {
	private PlatformActionListener platformActionListener;

	public WechatMomentsShare(PlatformActionListener mListener){
		this.platformActionListener = mListener;
		DemoUtils.isValidClient("com.tencent.mm");
	}

	public void shareText(){
		Platform platform = ShareSDK.getPlatform(WechatMoments.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setShareType(Platform.SHARE_TEXT);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareImage(){
		Platform platform = ShareSDK.getPlatform(WechatMoments.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		if (ResourcesManager.getInstace(MobSDK.getContext()).getImagePath() == null) {
			shareParams.setImageUrl("http://pic28.photophoto.cn/20130818/0020033143720852_b.jpg");
		} else {
			shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		}
		shareParams.setShareType(Platform.SHARE_IMAGE);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareMusic(){
		Platform platform = ShareSDK.getPlatform(WechatMoments.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		if (ResourcesManager.getInstace(MobSDK.getContext()).getImagePath() == null) {
			shareParams.setImageUrl("http://pic28.photophoto.cn/20130818/0020033143720852_b.jpg");
		} else {
			shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		}
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getMusicUrl());
//		shareParams.setMusicUrl(ResourcesManager.getInstace(MobSDK.getContext()).getMusicUrl());
		shareParams.setShareType(Platform.SHARE_MUSIC);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareVideo(){
		Platform platform = ShareSDK.getPlatform(WechatMoments.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setUrl("http://www.mob.com/video/ShareSDK.mp4");
		if (ResourcesManager.getInstace(MobSDK.getContext()).getImagePath() == null) {
			shareParams.setImageUrl("http://pic28.photophoto.cn/20130818/0020033143720852_b.jpg");
		} else {
			shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		}
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setShareType(Platform.SHARE_VIDEO);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareWebpager(){
		Platform platform = ShareSDK.getPlatform(WechatMoments.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setUrl(LINK_URL);//ResourcesManager.getInstace(MobSDK.getContext()).getUrl()
		shareParams.setImageData(ResourcesManager.getInstace(MobSDK.getContext()).getImageBmp());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setShareType(Platform.SHARE_WEBPAGE);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareText(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(WechatMoments.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setShareType(Platform.SHARE_TEXT);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareImage(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(WechatMoments.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		if (ResourcesManager.getInstace(MobSDK.getContext()).getImagePath() == null) {
			shareParams.setImageUrl("http://pic28.photophoto.cn/20130818/0020033143720852_b.jpg");
		} else {
			shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		}
		shareParams.setShareType(Platform.SHARE_IMAGE);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareMusic(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(WechatMoments.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		shareParams.setMusicUrl(ResourcesManager.getInstace(MobSDK.getContext()).getMusicUrl());
		shareParams.setShareType(Platform.SHARE_MUSIC);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareVideo(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(WechatMoments.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setUrl("http://www.mob.com/video/ShareSDK.mp4");
		shareParams.setShareType(Platform.SHARE_VIDEO);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}

	public void shareWebpager(PlatformActionListener mListener){
		Platform platform = ShareSDK.getPlatform(WechatMoments.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath());
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		shareParams.setImageData(ResourcesManager.getInstace(MobSDK.getContext()).getImageBmp());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setShareType(Platform.SHARE_WEBPAGE);
		platform.setPlatformActionListener(mListener);
		platform.share(shareParams);
	}
} public class WeworkShare {

    public static final int WEWORK_SHARE_IMAGE = 6001;
    public static final int WEWORK_SHARE_FILE = 6002;
    public static final int WEWORK_SHARE_VIDEO = 6003;


    private PlatformActionListener platformActionListener;

    public WeworkShare(PlatformActionListener mListener) {
        this.platformActionListener = mListener;
    }

    /** 企业微信文本 **/
    public void shareText() {
        Platform platform = ShareSDK.getPlatform(Wework.NAME);
        Platform.ShareParams sp = new Platform.ShareParams();
        sp.setText("TESTESTETS");
        sp.setShareType(Platform.SHARE_TEXT);
        platform.setPlatformActionListener(platformActionListener);
        platform.share(sp);
    }



    /** 企业微信图片 **/
    public void shareImage(String path) {
        Platform platform = ShareSDK.getPlatform(Wework.NAME);
        Platform.ShareParams sp = new Platform.ShareParams();
        sp.setText("TESTESTETS");
        sp.setImagePath(path);
        sp.setShareType(Platform.SHARE_IMAGE);
        platform.setPlatformActionListener(platformActionListener);
        platform.share(sp);
    }

    public void shareImage(Activity activity) {
        openSystemGallery(activity, WEWORK_SHARE_IMAGE);
    }



    /**
     * 企业微信文件分享
     * **/
    public void shareFile(String path) {
        Platform platform = ShareSDK.getPlatform(Wework.NAME);
        Platform.ShareParams sp = new Platform.ShareParams();
        sp.setText("文件分享");
        sp.setFilePath(path);
        sp.setShareType(Platform.SHARE_FILE);
        platform.setPlatformActionListener(platformActionListener);
        platform.share(sp);
    }

    public void shareFile(Activity activity) {
        openSystemGallery(activity, WEWORK_SHARE_FILE);
    }



    /**
     * 企业微信视频分享
     * **/
    public void shareVideo(String path) {
        Platform platform = ShareSDK.getPlatform(Wework.NAME);
        Platform.ShareParams sp = new Platform.ShareParams();
        sp.setText("视频test");
        sp.setFilePath(path);
        sp.setShareType(Platform.SHARE_VIDEO);
        platform.setPlatformActionListener(platformActionListener);
        platform.share(sp);
    }

    public void shareVideo(Activity activity) {
        openSystemGallery(activity, WEWORK_SHARE_VIDEO);
    }




    /**
     * 企业微信网页分享
     *
     * **/
    public void shareWebPage() {
        Platform platform = ShareSDK.getPlatform(Wework.NAME);
        Platform.ShareParams sp = new Platform.ShareParams();
        sp.setImageUrl("www.cctv.com");
        sp.setUrl("http://www.gov.cn/");
        sp.setTitle("webPage Title test");
        sp.setText("description");
        sp.setShareType(Platform.SHARE_WEBPAGE);
        platform.setPlatformActionListener(platformActionListener);
        platform.share(sp);
    }

    private void openSystemGallery(final Activity activity, final int shareType) {
        AlertDialog.Builder builder = new AlertDialog.Builder(activity);
        if (shareType == WEWORK_SHARE_IMAGE) {
            builder.setMessage("请根据分享的类型选择对应的分享内容")
                    .setNegativeButton("图片", new DialogInterface.OnClickListener(){
                        @Override
                        public void onClick(DialogInterface dialog, int which) {
                            Intent intent = new Intent(Intent.ACTION_PICK);
                            intent.setType("image/*");
                            intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
                            activity.startActivityForResult(intent, shareType);
                        }
                    });
        }
        if (shareType == WEWORK_SHARE_VIDEO) {
            builder.setMessage("请根据分享的类型选择对应的分享内容")
                    .setPositiveButton("视频", new DialogInterface.OnClickListener(){
                        @Override
                        public void onClick(DialogInterface dialog, int which) {
                            Intent intent = new Intent(Intent.ACTION_PICK);
                            intent.setType("video/*");
                            intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
                            activity.startActivityForResult(intent, shareType);
                        }
                    });
        }

        if (shareType == WEWORK_SHARE_FILE) {
            builder.setMessage("请根据分享的类型选择对应的分享内容")
                    .setNegativeButton("图片文件", new DialogInterface.OnClickListener(){
                        @Override
                        public void onClick(DialogInterface dialog, int which) {
                            Intent intent = new Intent(Intent.ACTION_PICK);
                            intent.setType("image/*");
                            intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
                            activity.startActivityForResult(intent, shareType);
                        }
                    });
        }

        AlertDialog dialog = builder.create();
        dialog.show();
    }

} public class WhatsAppShare {
	public static final int PHOTO_WHATS_APP = 1033;
	public static final int VIDEO_WHATS_APP = 1034;

	private PlatformActionListener platformActionListener;

	public WhatsAppShare(PlatformActionListener mListener){
		this.platformActionListener = mListener;
	}

	public void shareText(){
		Platform platform = ShareSDK.getPlatform(WhatsApp.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareImage(Activity activity) {
		openSystemGallery(activity);
	}

	/**
	 * 打开图片
	 * **/
	private void openSystemGallery(final Activity activity) {
		AlertDialog.Builder builder = new AlertDialog.Builder(activity);
		builder.setMessage("请选择图片").setPositiveButton("图片", new DialogInterface.OnClickListener() {
			@Override
			public void onClick(DialogInterface dialog, int which) {
				Intent intent = new Intent(Intent.ACTION_PICK);
				intent.setType("image/*");
				intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
				//startActivityForResult(intent, PHOTO_REQUEST_GALLERY);
				activity.startActivityForResult(intent, PHOTO_WHATS_APP);
			}
		});
		AlertDialog dialog = builder.create();
		dialog.show();
	}

	public void shareImage(String imagePath){
		Platform platform = ShareSDK.getPlatform(WhatsApp.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setImagePath(imagePath);
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		platform.setPlatformActionListener(platformActionListener);
		shareParams.setShareType(Platform.SHARE_IMAGE);
		platform.share(shareParams);
	}


	public void shareVideo(Activity activity) {
		openSystemVideo(activity, VIDEO_WHATS_APP);
	}

	/**
	 * 打开相册视频
	 * **/
	private void openSystemVideo(final Activity activity, final int shareType) {
		AlertDialog.Builder builder = new AlertDialog.Builder(activity);
		builder.setMessage("请选择视频").setPositiveButton("视频", new DialogInterface.OnClickListener() {
			@Override
			public void onClick(DialogInterface dialog, int which) {
				Intent intent = new Intent(Intent.ACTION_PICK);
				intent.setType("video/*");
				intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
				activity.startActivityForResult(intent, shareType);
			}
		});
		AlertDialog dialog = builder.create();
		dialog.show();
	}

	public void shareVideo(String videoPath){
		Platform platform = ShareSDK.getPlatform(WhatsApp.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setFilePath(videoPath);
		platform.setPlatformActionListener(platformActionListener);
		shareParams.setShareType(Platform.SHARE_VIDEO);
		platform.share(shareParams);
	}

	public void shareAddress(){
		Platform platform = ShareSDK.getPlatform(WhatsApp.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setFilePath(ResourcesManager.ADDRESS);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}
} public class YixinShare {
	private PlatformActionListener platformActionListener;

	public YixinShare(PlatformActionListener platformActionListener) {
		this.platformActionListener = platformActionListener;
		PackageInfo pi;
		DemoUtils.isValidClient("im.yixin");
	}

	public void shareText() {
		Platform platform = ShareSDK.getPlatform(Yixin.NAME);
		Platform.ShareParams shareParams = new Platform.ShareParams();
		shareParams.setText("texttestettt");
		shareParams.setTitle("titletsdfsdf");
		shareParams.setShareType(Platform.SHARE_TEXT);
		shareParams.setScence(0);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareImage() {
		Platform platform = ShareSDK.getPlatform(Yixin.NAME);
		Platform.ShareParams shareParams = new Platform.ShareParams();
		shareParams.setText("yixinText");
		shareParams.setTitle("title");
		shareParams.setImageUrl("http://pic28.photophoto.cn/20130818/0020033143720852_b.jpg");
		//shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		//shareParams.setImageData(ResourcesManager.getInstace(MobSDK.getContext()).getImageBmp());
		shareParams.setShareType(Platform.SHARE_IMAGE);
		shareParams.setScence(0);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareMusic() {
		Platform platform = ShareSDK.getPlatform(Yixin.NAME);
		Platform.ShareParams shareParams = new Platform.ShareParams();
		shareParams.setText("yixinText");
		shareParams.setTitle("title");
		shareParams.setImageUrl("http://pic28.photophoto.cn/20130818/0020033143720852_b.jpg");
		shareParams.setMusicUrl(ResourcesManager.getInstace(MobSDK.getContext()).getMusicUrl());
		shareParams.setUrl("https://www.baidu.com/");
		shareParams.setShareType(Platform.SHARE_MUSIC);
		shareParams.setScence(0);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareVideo() {
		Platform platform = ShareSDK.getPlatform(Yixin.NAME);
		Platform.ShareParams shareParams = new Platform.ShareParams();
		shareParams.setText("yixinText");
		shareParams.setTitle("title");
		shareParams.setImageUrl(IMAGE_TEST_URL);
		shareParams.setMusicUrl("https://y.qq.com/n/yqq/song/807557_num.html?ADTAG=h5_playsong&no_redirect=1");
		shareParams.setUrl("http://www.mob.com/video/ShareSDK.mp4");
		shareParams.setShareType(Platform.SHARE_VIDEO);
		shareParams.setScence(0);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareWebPager() {
		Platform platform = ShareSDK.getPlatform(Yixin.NAME);
		Platform.ShareParams shareParams = new Platform.ShareParams();
		shareParams.setText(LINK_TEXT);
		shareParams.setTitle("title");
		shareParams.setImageUrl(IMAGE_TEST_URL);
		shareParams.setMusicUrl("https://y.qq.com/n/yqq/song/807557_num.html?ADTAG=h5_playsong&no_redirect=1");
		shareParams.setUrl(LINK_URL);
		shareParams.setShareType(Platform.SHARE_WEBPAGE);
		shareParams.setScence(0);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}
} public class YixinMomentsShare {
	private PlatformActionListener platformActionListener;

	public YixinMomentsShare(PlatformActionListener platformActionListener){
		this.platformActionListener = platformActionListener;
		DemoUtils.isValidClient("im.yixin");
	}

	public void shareText(){
		Platform platform = ShareSDK.getPlatform(YixinMoments.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText("texttestettt");
		shareParams.setTitle("titletsdfsdf");
		shareParams.setImageUrl(IMAGE_TEST_URL);
		shareParams.setShareType(Platform.SHARE_TEXT);
		shareParams.setScence(1);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareImage(){
		Platform platform = ShareSDK.getPlatform(YixinMoments.NAME);
		Platform.ShareParams shareParams = new Platform.ShareParams();
		shareParams.setText("yixinText");
		shareParams.setTitle("title");
		shareParams.setImageUrl("http://pic28.photophoto.cn/20130818/0020033143720852_b.jpg");
		//shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		//shareParams.setImageData(ResourcesManager.getInstace(MobSDK.getContext()).getImageBmp());
		shareParams.setShareType(Platform.SHARE_IMAGE);
		shareParams.setScence(1);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareMusic(){
		Platform platform = ShareSDK.getPlatform(YixinMoments.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText("yixinText");
		shareParams.setTitle("title");
		shareParams.setImageUrl(IMAGE_TEST_URL);
		shareParams.setMusicUrl(ResourcesManager.getInstace(MobSDK.getContext()).getMusicUrl());
		shareParams.setUrl("https://www.baidu.com/");
		shareParams.setShareType(Platform.SHARE_MUSIC);
		shareParams.setScence(1);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareVideo(){
		Platform platform = ShareSDK.getPlatform(YixinMoments.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText("yixinText");
		shareParams.setTitle("title");
		shareParams.setImageUrl(IMAGE_TEST_URL);
		shareParams.setMusicUrl("https://y.qq.com/n/yqq/song/807557_num.html?ADTAG=h5_playsong&no_redirect=1");
		shareParams.setUrl("http://www.mob.com/video/ShareSDK.mp4");
		shareParams.setShareType(Platform.SHARE_VIDEO);
		shareParams.setScence(1);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

	public void shareWebPager(){
		Platform platform = ShareSDK.getPlatform(YixinMoments.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(LINK_TEXT);
		shareParams.setTitle("title");
		shareParams.setImageUrl(IMAGE_TEST_URL);
		shareParams.setMusicUrl("https://y.qq.com/n/yqq/song/807557_num.html?ADTAG=h5_playsong&no_redirect=1");
		//shareParams.setUrl("http://f1.webshare.mob.com/dvideo/demovideos.mp4");
		shareParams.setUrl(LINK_URL);
		shareParams.setShareType(Platform.SHARE_WEBPAGE);
		shareParams.setScence(1);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}
} public class YouDaoShare {
	private PlatformActionListener platformActionListener;

	public YouDaoShare(PlatformActionListener mListener){
		this.platformActionListener = mListener;
	}

	public void shareText(){
		Platform platform = ShareSDK.getPlatform(YouDao.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(LINK_TEXT);
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setUrl(LINK_URL);
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}
	public void shareImage(){
		Platform platform = ShareSDK.getPlatform(YouDao.NAME);
		Platform.ShareParams shareParams = new  Platform.ShareParams();
		shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText());
		shareParams.setTitle(ResourcesManager.getInstace(MobSDK.getContext()).getTitle());
		shareParams.setImageUrl(ResourcesManager.getInstace(MobSDK.getContext()).getImageUrl());
		shareParams.setImagePath(ResourcesManager.getInstace(MobSDK.getContext()).getImagePath());
		shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl());
		platform.setPlatformActionListener(platformActionListener);
		platform.share(shareParams);
	}

}
import android.app.Activity;
import com.mob.MobSDK;
import cn.sharesdk.alipay.friends.Alipay;
import cn.sharesdk.alipay.moments.AlipayMoments;
import cn.sharesdk.demo.entity.ResourcesManager;
import cn.sharesdk.demo.platform.littleredbook.LittleredbookShare;
import cn.sharesdk.demo.platform.alipay.friends.AlipayShare;
import cn.sharesdk.demo.platform.alipay.moments.AlipayMomentsShare;
import cn.sharesdk.demo.platform.dingding.friends.DingdingShare;
import cn.sharesdk.demo.platform.douban.DoubanShare;
import cn.sharesdk.demo.platform.douyin.DouyinShare;
import cn.sharesdk.demo.platform.dropbox.DropboxShare;
import cn.sharesdk.demo.platform.evernote.EvernoteShare;
import cn.sharesdk.demo.platform.facebook.FacebookShare;
import cn.sharesdk.demo.platform.facebookmessenger.FacebookMessengerShare;
import cn.sharesdk.demo.platform.flickr.FlickerShare;
import cn.sharesdk.demo.platform.foursquare.FourSquareShare;
import cn.sharesdk.demo.platform.instagram.InstagramShare;
import cn.sharesdk.demo.platform.instapaper.InstapaperShare;
import cn.sharesdk.demo.platform.kaixin.KaiXinShare;
import cn.sharesdk.demo.platform.kakao.story.KakaoStoryShare;
import cn.sharesdk.demo.platform.kakao.talk.KakaoTalkShare;
import cn.sharesdk.demo.platform.kuaishou.KuaishouShare;
import cn.sharesdk.demo.platform.line.LineShare;
import cn.sharesdk.demo.platform.linkedin.LinkedinShare;
import cn.sharesdk.demo.platform.meipai.MeipaiShare;
import cn.sharesdk.demo.platform.mingdao.MingdaoShare;
import cn.sharesdk.demo.platform.oasis.OasisShare;
import cn.sharesdk.demo.platform.pinterest.PinterestShare;
import cn.sharesdk.demo.platform.reddit.RedditShare;
import cn.sharesdk.demo.platform.renren.RenrenShare;
import cn.sharesdk.demo.platform.sina.WeiboShare;
import cn.sharesdk.demo.platform.snapchat.SnapChatShare;
import cn.sharesdk.demo.platform.system.email.EmailShare;
import cn.sharesdk.demo.platform.system.text.ShortMessageShare;
import cn.sharesdk.demo.platform.telegram.TelegramShare;
import cn.sharesdk.demo.platform.tencent.qq.QQShare;
import cn.sharesdk.demo.platform.tencent.qzone.QQZoneShare;
import cn.sharesdk.demo.platform.tiktok.TiktokShare;
import cn.sharesdk.demo.platform.tumblr.TumblrShare;
import cn.sharesdk.demo.platform.twitter.TwitterShare;
import cn.sharesdk.demo.platform.vkontakte.VKontakteShare;
import cn.sharesdk.demo.platform.watermelonvideo.WatermelonvideoShare;
import cn.sharesdk.demo.platform.wechat.favorite.WechatFavoriteShare;
import cn.sharesdk.demo.platform.wechat.friends.WechatShare;
import cn.sharesdk.demo.platform.wechat.moments.WechatMomentsShare;
import cn.sharesdk.demo.platform.wework.WeworkShare;
import cn.sharesdk.demo.platform.whatsapp.WhatsAppShare;
import cn.sharesdk.demo.platform.yixin.friends.YixinShare;
import cn.sharesdk.demo.platform.yixin.moments.YixinMomentsShare;
import cn.sharesdk.demo.platform.youdao.YouDaoShare;
import cn.sharesdk.demo.platform.youtub.YoutubeShare;
import cn.sharesdk.dingding.friends.Dingding;
import cn.sharesdk.douban.Douban;
import cn.sharesdk.douyin.Douyin;
import cn.sharesdk.dropbox.Dropbox;
import cn.sharesdk.evernote.Evernote;
import cn.sharesdk.facebook.Facebook;
import cn.sharesdk.facebookmessenger.FacebookMessenger;
import cn.sharesdk.flickr.Flickr;
import cn.sharesdk.foursquare.FourSquare;
import cn.sharesdk.framework.Platform;
import cn.sharesdk.framework.PlatformActionListener;
import cn.sharesdk.framework.ShareSDK;
import cn.sharesdk.instagram.Instagram;
import cn.sharesdk.instapaper.Instapaper;
import cn.sharesdk.kaixin.KaiXin;
import cn.sharesdk.kakao.story.KakaoStory;
import cn.sharesdk.kakao.talk.KakaoTalk;
import cn.sharesdk.kuaishou.Kuaishou;
import cn.sharesdk.line.Line;
import cn.sharesdk.linkedin.LinkedIn;
import cn.sharesdk.littleredbook.Littleredbook;
import cn.sharesdk.meipai.Meipai;
import cn.sharesdk.mingdao.Mingdao;
import cn.sharesdk.oasis.Oasis;
import cn.sharesdk.pinterest.Pinterest;
import cn.sharesdk.reddit.Reddit;
import cn.sharesdk.renren.Renren;
import cn.sharesdk.sina.weibo.SinaWeibo;
import cn.sharesdk.snapchat.Snapchat;
import cn.sharesdk.system.email.Email;
import cn.sharesdk.system.text.ShortMessage;
import cn.sharesdk.telegram.Telegram;
import cn.sharesdk.tencent.qq.QQ;
import cn.sharesdk.tencent.qzone.QZone;
import cn.sharesdk.tencent.weibo.TencentWeibo;
import cn.sharesdk.tiktok.Tiktok;
import cn.sharesdk.tumblr.Tumblr;
import cn.sharesdk.twitter.Twitter;
import cn.sharesdk.vkontakte.VKontakte;
import cn.sharesdk.watermelonvideo.Watermelonvideo;
import cn.sharesdk.wechat.favorite.WechatFavorite;
import cn.sharesdk.wechat.friends.Wechat;
import cn.sharesdk.wechat.moments.WechatMoments;
import cn.sharesdk.wework.Wework;
import cn.sharesdk.whatsapp.WhatsApp;
import cn.sharesdk.yixin.friends.Yixin;
import cn.sharesdk.yixin.moments.YixinMoments;
import cn.sharesdk.youdao.YouDao;
import cn.sharesdk.youtube.Youtube;
package cn.sharesdk.demo.platform;

/**
 * Created by yjin on 2017/6/19.
 */




/**
 * 获取各个平台后进行分享的操作。
 */

public class PlatformShareManager {
	private PlatformActionListener platformActionListener;

	public void setPlatformActionListener(PlatformActionListener platformActionListener) {
		this.platformActionListener = platformActionListener;
	}

	public void shareText(String name) {
		if (name.equals(Alipay.NAME)) {
			AlipayShare alipay = new AlipayShare(platformActionListener);
			alipay.shareText();
		} else if (name.equals(Dingding.NAME)) {
			DingdingShare dingdingShare = new DingdingShare(platformActionListener);
			dingdingShare.shareText();
		} else if (name.equals(Douban.NAME)) {
			DoubanShare doubanShare = new DoubanShare(platformActionListener);
			doubanShare.shareText();
		} else if (name.equals(Evernote.NAME)) {
			EvernoteShare evernoteShare = new EvernoteShare(platformActionListener);
			evernoteShare.shareText();
		} else if (name.equals(KaiXin.NAME)) {
			KaiXinShare kaiXinShare = new KaiXinShare(platformActionListener);
			kaiXinShare.shareText();
		} else if (name.equals(KakaoStory.NAME)) {
			KakaoStoryShare kakaoStoryShare = new KakaoStoryShare(platformActionListener);
			kakaoStoryShare.shareText();
		} else if (name.equals(KakaoTalk.NAME)) {
			KakaoTalkShare kakaoTalkShare = new KakaoTalkShare(platformActionListener);
			kakaoTalkShare.shareText();
		} else if (name.equals(Line.NAME)) {
			LineShare lineShare = new LineShare(platformActionListener);
			lineShare.shareText();
		} else if (name.equals(LinkedIn.NAME)) {
			LinkedinShare linkedinShare = new LinkedinShare(platformActionListener);
			linkedinShare.shareText();
		} else if (name.equals(Mingdao.NAME)) {
			MingdaoShare mingdaoShare = new MingdaoShare(platformActionListener);
			mingdaoShare.shareText();
		} else if (name.equals(Renren.NAME)) {
			RenrenShare renrenShare = new RenrenShare(platformActionListener);
			renrenShare.shareText();
		} else if (name.equals(SinaWeibo.NAME)) {
			WeiboShare weiboShare = new WeiboShare(platformActionListener);
			weiboShare.shareText();
		} else if (name.equals(QZone.NAME)) {
			QQZoneShare qqZoneShare = new QQZoneShare(platformActionListener);
			qqZoneShare.shareText();
		} else if (name.equals(TencentWeibo.NAME)) {
			cn.sharesdk.demo.platform.tencent.WeiboShare qqZoneShare = new cn.sharesdk.demo.platform.tencent.WeiboShare(platformActionListener);
			qqZoneShare.shareText();
		} else if (name.equals(Tumblr.NAME)) {
			TumblrShare tumblrShare = new TumblrShare(platformActionListener);