本文整理汇总了Java中com.umeng.socialize.bean.RequestType类的典型用法代码示例。如果您正苦于以下问题:Java RequestType类的具体用法?Java RequestType怎么用?Java RequestType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RequestType类属于com.umeng.socialize.bean包,在下文中一共展示了RequestType类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: sendAnalytic
import com.umeng.socialize.bean.RequestType; //导入依赖的package包/类
public static void sendAnalytic(Context context, String str, String str2, UMediaObject
uMediaObject, String str3) {
UMSocialService uMSocialService = UMServiceFactory.getUMSocialService(str, RequestType
.ANALYTICS);
UMShareMsg uMShareMsg = new UMShareMsg();
Log.i(TAG, "send analytic report , the entity name is " + uMSocialService.getEntity()
.mDescriptor);
if (uMediaObject instanceof BaseMediaObject) {
uMShareMsg.setMediaData(uMediaObject);
} else if (uMediaObject instanceof BaseShareContent) {
uMShareMsg.setMediaData(((BaseShareContent) uMediaObject).getShareMedia());
}
uMSocialService.getEntity().setFireCallback(false);
uMShareMsg.mText = str2;
uMSocialService.postShareByCustomPlatform(context, null, str3, uMShareMsg, null);
}
示例2: getAppIdFromServer
import com.umeng.socialize.bean.RequestType; //导入依赖的package包/类
protected void getAppIdFromServer(final ObtainAppIdListener listener) {
if (DeviceConfig.isNetworkAvailable(this.mContext)) {
new DialogAsyncTask<GetPlatformKeyResponse>(this.mContext, "获取AppID中...") {
protected GetPlatformKeyResponse doInBackground() {
return new BaseController(new SocializeEntity("com.umeng.qq.sso", RequestType
.SOCIAL)).getPlatformKeys(UMTencentSsoHandler.this.mContext);
}
protected void onPostExecute(GetPlatformKeyResponse response) {
super.onPostExecute(response);
if (response == null || response.mData == null) {
Log.e(UMTencentSsoHandler.TAG, "obtain appId failed,public account " +
"share...");
UMTencentSsoHandler.this.mAppID = UMTencentSsoHandler.PUBLIC_ACCOUNT;
listener.onComplete();
return;
}
UMTencentSsoHandler.this.mAppID = (String) response.mData.get("qzone");
if (response.mSecrets != null) {
UMTencentSsoHandler.this.mAppKey = (String) response.mSecrets.get("qzone");
}
SocializeUtils.savePlatformKey(UMTencentSsoHandler.this.mContext, response
.mData);
OauthHelper.saveAppidAndAppkey(UMTencentSsoHandler.this.mContext,
UMTencentSsoHandler.this.mAppID, UMTencentSsoHandler.this.mAppKey);
if (listener != null) {
listener.onComplete();
}
}
}.execute();
} else {
Toast.makeText(this.mContext, "您的网络不可用,请检查网络连接...", 0).show();
}
}