本文整理汇总了Java中com.sina.weibo.sdk.api.BaseMediaObject类的典型用法代码示例。如果您正苦于以下问题:Java BaseMediaObject类的具体用法?Java BaseMediaObject怎么用?Java BaseMediaObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BaseMediaObject类属于com.sina.weibo.sdk.api包,在下文中一共展示了BaseMediaObject类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: b
import com.sina.weibo.sdk.api.BaseMediaObject; //导入依赖的package包/类
private BaseMediaObject b() {
WebpageObject webpageObject = new WebpageObject();
webpageObject.identify = Utility.generateGUID();
webpageObject.title = f.getTitle();
webpageObject.description = f.getText();
try {
this.b = 32768;
if (f.getImageData() != null) {
webpageObject.setThumbImage(a((Context) this, f.getImageData()));
} else if (!TextUtils.isEmpty(f.getImagePath())) {
webpageObject.setThumbImage(a((Context) this, f.getImagePath()));
}
} catch (Throwable th) {
Ln.e(th);
webpageObject.setThumbImage(null);
}
webpageObject.actionUrl = f.getUrl();
webpageObject.defaultText = f.getText();
return webpageObject;
}
示例2: initCommonParams
import com.sina.weibo.sdk.api.BaseMediaObject; //导入依赖的package包/类
private void initCommonParams(BaseMediaObject mediaObject, String title, byte[] data, String actionUrl, String defaultText) {
mediaObject.identify = Utility.generateGUID();
mediaObject.title = title;
mediaObject.description = defaultText;
// 设置 Bitmap 类型的图片到视频对象里
// 设置缩略图。 注意:最终压缩过的缩略图大小不得超过 32kb。
mediaObject.thumbData = data;
mediaObject.actionUrl = actionUrl;
}
示例3: send
import com.sina.weibo.sdk.api.BaseMediaObject; //导入依赖的package包/类
private void send(BaseMediaObject mediaObject, Activity activity) {
WeiboMessage weiboMessage = new WeiboMessage();
weiboMessage.mediaObject = mediaObject;
SendMessageToWeiboRequest request = new SendMessageToWeiboRequest();
request.transaction = String.valueOf(System.currentTimeMillis());
request.message = weiboMessage;
mWeiboShareAPI.sendRequest(activity, request);
}