本文整理匯總了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);
}