Java Code Examples for cn.sharesdk.framework.Platform#SHARE_FILE

The following examples show how to use cn.sharesdk.framework.Platform#SHARE_FILE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PlatformUITypeManager.java    From ShareSDK-for-Android with MIT License 5 votes vote down vote up
public static int getPlatformIcon(int share_type) {
	switch (share_type) {
		case Platform.SHARE_VIDEO: {
			return R.mipmap.base_video;
		}
		case Platform.SHARE_TEXT: {
			return R.mipmap.share_text;
		}
		case Platform.SHARE_IMAGE: {
			return R.mipmap.share_multimages;
		}
		case Platform.SHARE_APPS: {
			return R.mipmap.share_app;
		}
		case Platform.SHARE_FILE: {
			return R.mipmap.base_file;
		}
		case Platform.SHARE_EMOJI: {
			return R.mipmap.share_icon;
		}
		case Platform.SHARE_WXMINIPROGRAM: {
			return R.mipmap.share_mini_program;
		}
		case Platform.SHARE_MUSIC: {
			return R.mipmap.share_url_music;
		}
		case Platform.SHARE_LINKCARD: {
			return R.mipmap.share_url_music;
		}
		default: {
			return R.mipmap.share_webpage;
		}
	}
}
 
Example 2
Source File: PlatformUITypeManager.java    From ShareSDK-for-Android with MIT License 5 votes vote down vote up
public static int getPlatformName(int share_type) {
	switch (share_type) {
		case Platform.SHARE_VIDEO: {
			return R.string.platform_share_video;
		}
		case Platform.SHARE_TEXT: {
			return R.string.platform_share_text;
		}
		case Platform.SHARE_IMAGE: {
			return R.string.platform_share_image;
		}
		case Platform.SHARE_APPS: {
			return R.string.platform_share_app;
		}
		case Platform.SHARE_FILE: {
			return R.string.platform_share_file;
		}
		case Platform.SHARE_EMOJI: {
			return R.string.platform_share_emoji;
		}
		case Platform.SHARE_WXMINIPROGRAM: {
			return R.string.platform_share_mini_app;
		}
		case Platform.SHARE_WEBPAGE: {
			return R.string.platform_share_webpage;
		}
		case Platform.SHARE_MUSIC: {
			return R.string.platform_share_music;
		}
		case Platform.SHARE_LINKCARD: {
			return R.string.platform_share_linkcard;
		}
		case Platform.QQ_MINI_PROGRAM: {
			return R.string.platform_share_qqmini;
		}
		default: {
			return R.string.platform_share_webpage;
		}
	}
}
 
Example 3
Source File: ShareTypeManager.java    From ShareSDK-for-Android with MIT License 4 votes vote down vote up
public void shareShow(int platform, Activity activity) {
    switch (platform) {
        case Platform.SHARE_TEXT: {
            shareText();
        } break;
        case Platform.SHARE_VIDEO: {
            shareVideo(activity);
        } break;
        case Platform.SHARE_IMAGE: {
            shareImage(activity);
        } break;
        case Platform.SHARE_APPS: {
            shareApp();
        } break;
        case Platform.SHARE_FILE: {
            shareFiles(activity);
        } break;
        case Platform.SHARE_EMOJI: {
            shareEmoji();
        } break;
        case Platform.SHARE_WXMINIPROGRAM: {
            shareMiniProgram();
        } break;
        case Platform.SHARE_WEBPAGE: {
            shareWebPage(activity);
        } break;
        case Platform.SHARE_MUSIC: {
            shareMusic();
        } break;

        case Platform.SHARE_LINKCARD: {
            shareLinkCard();
        } break;

        case Platform.QQ_MINI_PROGRAM: {
            shareQQMiniProgram(activity);
        } break;


    }
}
 
Example 4
Source File: PlatformShareConstant.java    From ShareSDK-for-Android with MIT License 4 votes vote down vote up
private PlatformShareConstant(){
	douyin = new Integer[]{Platform.SHARE_VIDEO, Platform.SHARE_IMAGE};
	sinaWeibo = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_TEXT, Platform.SHARE_VIDEO, Platform.SHARE_LINKCARD};
	tencentWeibo = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_TEXT};
	qzone = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_TEXT,Platform.SHARE_WEBPAGE, Platform.SHARE_VIDEO};
	wechat = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_TEXT, Platform.SHARE_FILE, Platform.SHARE_WEBPAGE, Platform.SHARE_MUSIC, 
			Platform.SHARE_VIDEO, Platform.SHARE_EMOJI, Platform.SHARE_WXMINIPROGRAM};
	wechatMoments = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_TEXT, Platform.SHARE_WEBPAGE, Platform.SHARE_MUSIC, Platform.SHARE_VIDEO};
	wechatFavorite = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_TEXT, Platform.SHARE_FILE, Platform.SHARE_WEBPAGE, 
			Platform.SHARE_MUSIC, Platform.SHARE_VIDEO};
	qq = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_WEBPAGE, Platform.SHARE_MUSIC};
	facebook = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_WEBPAGE, Platform.SHARE_VIDEO};
	twitter = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_TEXT, Platform.SHARE_VIDEO};
	renren = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_TEXT};
	kaiXin = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_TEXT};
	email = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_TEXT, Platform.SHARE_VIDEO};
	shortMessage = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_TEXT, Platform.SHARE_VIDEO};
	douban = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_TEXT};
	youDao = new Integer[]{Platform.SHARE_TEXT, Platform.SHARE_IMAGE};
	evernote = new Integer[]{Platform.SHARE_IMAGE,Platform.SHARE_TEXT, Platform.SHARE_VIDEO};
	linkedIn = new Integer[]{Platform.SHARE_TEXT, Platform.SHARE_WEBPAGE};
	fourSquare = new Integer[]{Platform.SHARE_IMAGE};
	pinterest = new Integer[]{Platform.SHARE_IMAGE};
	flickr = new Integer[]{Platform.SHARE_IMAGE};
	tumblr = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_TEXT};
	dropbox = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_FILE, Platform.SHARE_VIDEO};
	vkontakte = new Integer[]{Platform.SHARE_IMAGE};
	instagram = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_VIDEO, Platform.SHARE_TEXT};
	yixin = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_TEXT, Platform.SHARE_MUSIC,Platform.SHARE_VIDEO,Platform.SHARE_WEBPAGE};
	yixinMoments = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_TEXT, Platform.SHARE_MUSIC,Platform.SHARE_VIDEO,Platform.SHARE_WEBPAGE};
	mingdao = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_TEXT};
	line = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_TEXT	};
	kakaoTalk = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_TEXT};
	kakaoStory = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_TEXT, Platform.SHARE_VIDEO};
	whatsApp = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_TEXT, Platform.SHARE_VIDEO};
	bluetooth = new Integer[]{Platform.SHARE_FILE};
	pocket = new Integer[]{Platform.SHARE_WEBPAGE};
	instapaper = new Integer[]{Platform.SHARE_TEXT, Platform.SHARE_WEBPAGE	};
	facebookMessenger = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_WEBPAGE};
	alipay = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_TEXT, Platform.SHARE_WEBPAGE};
	alipayMoments = new Integer[]{Platform.SHARE_WEBPAGE};
	dingding = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_TEXT, Platform.SHARE_WEBPAGE};
	youtube = new Integer[]{Platform.SHARE_VIDEO};
	meipai = new Integer[]{Platform.SHARE_IMAGE, Platform.SHARE_VIDEO};
	telegram = new Integer[]{Platform.SHARE_TEXT, Platform.SHARE_IMAGE};
	reddit = new Integer[]{Platform.SHARE_TEXT, Platform.SHARE_WEBPAGE};
	wework = new Integer[]{Platform.SHARE_TEXT, Platform.SHARE_IMAGE, Platform.SHARE_FILE,
							Platform.SHARE_VIDEO, Platform.SHARE_WEBPAGE};
}