Java Code Examples for cn.sharesdk.framework.Platform#setPlatformActionListener()
The following examples show how to use
cn.sharesdk.framework.Platform#setPlatformActionListener() .
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: OnekeyShareThemeImpl.java From GithubApp with Apache License 2.0 | 6 votes |
final void shareSilently(Platform platform) { if (formateShareData(platform)) { ShareParams sp = shareDataToShareParams(platform); if (sp != null) { toast("ssdk_oks_sharing"); if (customizeCallback != null) { customizeCallback.onShare(platform, sp); } if (disableSSO) { platform.SSOSetting(disableSSO); } platform.setPlatformActionListener(callback); platform.share(sp); } } }
Example 2
Source File: OnekeyShareThemeImpl.java From HHComicViewer with Apache License 2.0 | 6 votes |
final void shareSilently(Platform platform) { if (formateShareData(platform)) { ShareParams sp = shareDataToShareParams(platform); if (sp != null) { toast("ssdk_oks_sharing"); if (customizeCallback != null) { customizeCallback.onShare(platform, sp); } if (disableSSO) { platform.SSOSetting(disableSSO); } platform.setPlatformActionListener(callback); platform.share(sp); } } }
Example 3
Source File: WeworkShare.java From ShareSDK-for-Android with MIT License | 5 votes |
/** * 企业微信文件分享 * **/ 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); }
Example 4
Source File: WechatFavoriteShare.java From ShareSDK-for-Android with MIT License | 5 votes |
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); }
Example 5
Source File: EmailShare.java From ShareSDK-for-Android with MIT License | 5 votes |
public void shareText(){ Platform platform = ShareSDK.getPlatform(Email.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); }
Example 6
Source File: YouDaoShare.java From ShareSDK-for-Android with MIT License | 5 votes |
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); }
Example 7
Source File: WechatShare.java From ShareSDK-for-Android with MIT License | 5 votes |
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); }
Example 8
Source File: LineShare.java From ShareSDK-for-Android with MIT License | 5 votes |
public void shareText(PlatformActionListener mListener){ Platform platform = ShareSDK.getPlatform(Line.NAME); Platform.ShareParams shareParams = new Platform.ShareParams(); shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText()); platform.setPlatformActionListener(mListener); platform.share(shareParams); }
Example 9
Source File: DouyinShare.java From ShareSDK-for-Android with MIT License | 5 votes |
public void shareVideo(Activity activity) { String filePath = ResourcesManager.getInstace(MobSDK.getContext()).getFilePath(); if (TextUtils.isEmpty(filePath)) { openSystemGallery(activity, DOUYIN_VIDEO); } else { Platform platform = ShareSDK.getPlatform(Douyin.NAME); Platform.ShareParams shareParams = new Platform.ShareParams(); shareParams.setFilePath(ResourcesManager.getInstace(MobSDK.getContext()).getFilePath()); shareParams.setShareType(Platform.SHARE_VIDEO); shareParams.setActivity(activity); platform.setPlatformActionListener(platformActionListener); platform.share(shareParams); } }
Example 10
Source File: WechatFavoriteShare.java From ShareSDK-for-Android with MIT License | 5 votes |
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); }
Example 11
Source File: AlipayMomentsShare.java From ShareSDK-for-Android with MIT License | 5 votes |
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); }
Example 12
Source File: LinkedinShare.java From ShareSDK-for-Android with MIT License | 5 votes |
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); }
Example 13
Source File: NetEaseMicroBlog.java From ShareSDK-for-Android with MIT License | 5 votes |
public void shareText(){ Platform platform = ShareSDK.getPlatform("NetEaseMicroBlog"); Platform.ShareParams shareParams = new Platform.ShareParams(); shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText()); shareParams.setShareType(Platform.SHARE_VIDEO); platform.setPlatformActionListener(platformActionListener); platform.share(shareParams); }
Example 14
Source File: DingdingMessageShare.java From ShareSDK-for-Android with MIT License | 5 votes |
public void shareMusic(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.setMusicUrl(ResourcesManager.getInstace(MobSDK.getContext()).getMusicUrl()); shareParams.setUrl(ResourcesManager.getInstace(MobSDK.getContext()).getUrl()); shareParams.setShareType(Platform.SHARE_MUSIC); shareParams.setScence(1); platform.setPlatformActionListener(mListener); platform.share(shareParams); }
Example 15
Source File: QQShare.java From ShareSDK-for-Android with MIT License | 5 votes |
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(LINK_URL); shareParams.setShareType(Platform.SHARE_WEBPAGE); platform.setPlatformActionListener(platformActionListener); platform.share(shareParams); }
Example 16
Source File: AlipayShare.java From ShareSDK-for-Android with MIT License | 5 votes |
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); }
Example 17
Source File: NetEaseMicroBlog.java From ShareSDK-for-Android with MIT License | 5 votes |
public void shareText(PlatformActionListener mListener){ Platform platform = ShareSDK.getPlatform("NetEaseMicroBlog"); Platform.ShareParams shareParams = new Platform.ShareParams(); shareParams.setText(ResourcesManager.getInstace(MobSDK.getContext()).getText()); shareParams.setShareType(Platform.SHARE_VIDEO); platform.setPlatformActionListener(mListener); platform.share(shareParams); }
Example 18
Source File: MingdaoShare.java From ShareSDK-for-Android with MIT License | 5 votes |
public void shareText(){ Platform platform = ShareSDK.getPlatform(Mingdao.NAME); Platform.ShareParams shareParams = new Platform.ShareParams(); shareParams.setUrl(LINK_URL); shareParams.setText(LINK_TEXT); platform.setPlatformActionListener(platformActionListener); platform.share(shareParams); }
Example 19
Source File: FollowListPage.java From BigApp_WordPress_Android with Apache License 2.0 | 4 votes |
public void setPlatform(Platform platform) { this.platform = platform; platform.setPlatformActionListener(this); }
Example 20
Source File: FollowListPage.java From BigApp_Discuz_Android with Apache License 2.0 | 4 votes |
public void setPlatform(Platform platform) { this.platform = platform; platform.setPlatformActionListener(this); }