本文整理匯總了Java中cn.sharesdk.framework.Platform.ShareParams方法的典型用法代碼示例。如果您正苦於以下問題:Java Platform.ShareParams方法的具體用法?Java Platform.ShareParams怎麽用?Java Platform.ShareParams使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類cn.sharesdk.framework.Platform
的用法示例。
在下文中一共展示了Platform.ShareParams方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: share
import cn.sharesdk.framework.Platform; //導入方法依賴的package包/類
public static void share(String title, String titleurl
, String text, String imagedir, String imageUrl, String url, String platformName, PlatformActionListener listener) {
// QQ.NAME;
// Wechat.NAME
// SinaWeibo.NAMENAME;
Platform p = ShareSDK.getPlatform(platformName);
if (p != null) {
p.setPlatformActionListener(listener);
}
Platform.ShareParams sp = new Platform.ShareParams();
if (TextUtils.isEmpty(imagedir)) {
sp.setImageUrl(imageUrl);
} else {
sp.setImagePath(imagedir);
}
sp.setTitle(title);
sp.setTitleUrl(titleurl);
sp.setText(text);
sp.setUrl(url);
p.share(sp);
}
示例2: shareImage
import cn.sharesdk.framework.Platform; //導入方法依賴的package包/類
public static void shareImage(Bitmap bitmap) {
Platform.ShareParams shareParams = new Platform.ShareParams();
shareParams.setShareType(Platform.SHARE_EMOJI);
shareParams.setImageData(bitmap);
Platform platform = ShareSDK.getPlatform(Wechat.NAME);
platform.share(shareParams);
}
示例3: shareImageUrl
import cn.sharesdk.framework.Platform; //導入方法依賴的package包/類
public static void shareImageUrl(String url) {
Platform.ShareParams shareParams = new Platform.ShareParams();
shareParams.setShareType(Platform.SHARE_EMOJI);
shareParams.setImageUrl(url);
Platform platform = ShareSDK.getPlatform(Wechat.NAME);
platform.share(shareParams);
}
示例4: shareImageToWechat
import cn.sharesdk.framework.Platform; //導入方法依賴的package包/類
public static void shareImageToWechat(String path, boolean isBitmap) {
Platform.ShareParams shareParams = new Platform.ShareParams();
shareParams.setShareType(isBitmap ? Platform.SHARE_IMAGE : Platform.SHARE_EMOJI);
shareParams.setImagePath(path);
Platform platform = ShareSDK.getPlatform(Wechat.NAME);
platform.share(shareParams);
}
示例5: shareImageToQQ
import cn.sharesdk.framework.Platform; //導入方法依賴的package包/類
public static void shareImageToQQ(String path, boolean isBitmap) {
Platform.ShareParams shareParams = new Platform.ShareParams();
shareParams.setShareType(isBitmap ? Platform.SHARE_IMAGE : Platform.SHARE_EMOJI);
shareParams.setImagePath(path);
Platform platform = ShareSDK.getPlatform(QQ.NAME);
platform.share(shareParams);
}