本文整理汇总了Java中com.umeng.socialize.bean.SocializeEntity类的典型用法代码示例。如果您正苦于以下问题:Java SocializeEntity类的具体用法?Java SocializeEntity怎么用?Java SocializeEntity使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SocializeEntity类属于com.umeng.socialize.bean包,在下文中一共展示了SocializeEntity类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onComplete
import com.umeng.socialize.bean.SocializeEntity; //导入依赖的package包/类
public void onComplete(SHARE_MEDIA platform, int eCode, SocializeEntity entity) {
if (eCode == 200) {
ShareHelper.this.shareSuccessfully();
switch (ShareHelper.mFromWhere) {
case 0:
MobclickAgent.onEvent(ShareHelper.mActivity, Event.STATUS_ADD_SHARE_OK);
return;
case 1:
MobclickAgent.onEvent(ShareHelper.mActivity, Event.MINE_ADD_SHARE_OK);
return;
default:
return;
}
}
Helper.showToast((CharSequence) "分享失败,请重试!");
}
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:17,代码来源:ShareHelper.java
示例2: a
import com.umeng.socialize.bean.SocializeEntity; //导入依赖的package包/类
private String a(SocializeEntity socializeEntity, SHARE_MEDIA share_media) {
String str = "http://log.umsns.com/share/auth/" + SocializeUtils.getAppkey(this.k) + "/"
+ socializeEntity.mEntityKey + "/?";
Map baseQuery = SocializeNetUtils.getBaseQuery(this.k, socializeEntity, 10);
StringBuilder stringBuilder = new StringBuilder("via=" + share_media + com.alipay.sdk.sys
.a.b);
for (String str2 : baseQuery.keySet()) {
stringBuilder.append(str2 + "=" + baseQuery.get(str2) + com.alipay.sdk.sys.a.b);
}
if (stringBuilder.length() > 0) {
stringBuilder.deleteCharAt(stringBuilder.length() - 1);
}
try {
return str + ("ud_get=" + AesHelper.encryptNoPadding(stringBuilder.toString(),
"UTF-8"));
} catch (Exception e) {
e.printStackTrace();
return str;
}
}
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:21,代码来源:j.java
示例3: dispatchKeyEvent
import com.umeng.socialize.bean.SocializeEntity; //导入依赖的package包/类
public boolean dispatchKeyEvent(KeyEvent keyEvent) {
if (!SocializeConstants.BACKKEY_COMPLETE_CLOSE || keyEvent.getKeyCode() != 4) {
return super.dispatchKeyEvent(keyEvent);
}
if (this.r.isShowing()) {
this.r.dismiss();
}
new Handler().postDelayed(new z(this), 400);
SocializeEntity entity = this.v.getEntity();
for (SnsPostListener onComplete : (SnsPostListener[]) this.v.getConfig().getListener
(SnsPostListener.class)) {
onComplete.onComplete(this.x, StatusCode.ST_CODE_ERROR_CANCEL, entity);
}
if (this.v != null) {
this.v.getConfig().cleanListeners();
}
return true;
}
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:19,代码来源:ShareActivity.java
示例4: handleOnClick
import com.umeng.socialize.bean.SocializeEntity; //导入依赖的package包/类
protected void handleOnClick(CustomPlatform customPlatform, SocializeEntity entity,
SnsPostListener listener) {
if (SocializeConstants.DEFAULTID.equals(this.mAppID)) {
showDialog();
return;
}
this.mSocializeConfig.registerListener(listener);
mEntity = entity;
SocializeConfig.setSelectedPlatfrom(SHARE_MEDIA.QZONE);
if (TextUtils.isEmpty(this.mAppID)) {
this.mAppID = (String) OauthHelper.getAppIdAndAppkey(this.mContext).get("appid");
this.mAppKey = (String) OauthHelper.getAppIdAndAppkey(this.mContext).get("appkey");
}
if (TextUtils.isEmpty(this.mAppID)) {
getAppIdFromServer(new ObtainAppIdListener() {
public void onComplete() {
QZoneSsoHandler.this.shareToQZone();
}
});
} else {
shareToQZone();
}
}
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:24,代码来源:QZoneSsoHandler.java
示例5: setShareBtn
import com.umeng.socialize.bean.SocializeEntity; //导入依赖的package包/类
/**
* 设置自定义监听
*
* @param context 上下文
* @param mController 分享服务
* @param var 平开类型
*/
private static void setShareBtn(final Context context, final UMSocialService mController, SHARE_MEDIA var) {
mController.postShare(context, var,
new SocializeListeners.SnsPostListener() {
@Override
public void onStart() {
}
@Override
public void onComplete(SHARE_MEDIA arg0, int eCode,
SocializeEntity arg2) {
if (eCode == 200) {
} else {
String eMsg = "";
if (eCode == -101) {
eMsg = "没有授权";
}
}
}
});
}
开发者ID:paradoxie,项目名称:UmengSocialLibrary,代码行数:29,代码来源:MainActivity.java
示例6: registerCallback
import com.umeng.socialize.bean.SocializeEntity; //导入依赖的package包/类
/**
* 设置分享回调
*
* @param
*/
public static void registerCallback(final Context context) {
mController.getConfig().cleanListeners();
mController.getConfig().registerListener(new SnsPostListener() {
@Override
public void onStart() {
}
@Override
public void onComplete(SHARE_MEDIA platform, int stCode,
SocializeEntity entity) {
if (stCode == 200) {
Toast.makeText(context, "分享成功", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(context, "分享失败", Toast.LENGTH_SHORT).show();
}
}
});
}
开发者ID:shenhuanet,项目名称:LoginRegisterFramework,代码行数:26,代码来源:ShareUtils.java
示例7: onComplete
import com.umeng.socialize.bean.SocializeEntity; //导入依赖的package包/类
@Override
public void onComplete(SHARE_MEDIA shareMedia, int eCode, SocializeEntity socializeEntity) {
if (eCode != 200) {
String eMsg = "";
if (eCode == -101) {
eMsg = MainApplication.getInstance().getString(com.cuitrip.service.R.string.ct_error_no_authorized);
Context context = contextSoft.get();
if (context != null) {
MessageUtils.showToast(com.cuitrip.service.R.string.ct_share_failed);
}
}
MessageUtils.showToast(com.cuitrip.service.R.string.ct_share_cancel);
} else {
MessageUtils.showToast(com.cuitrip.service.R.string.ct_share_suc);
}
// 分享成功后尝试取消监听的注册
mController.unregisterListener(this);
}
开发者ID:MoonRune,项目名称:CuiTrip,代码行数:20,代码来源:ShareUtil.java
示例8: shareContent
import com.umeng.socialize.bean.SocializeEntity; //导入依赖的package包/类
private void shareContent(SHARE_MEDIA media) {
mController.setShareContent(getShareContent() + getShareUrl());
mController.directShare(getActivity(), media, new SnsPostListener() {
@Override
public void onStart() {
AppContext.showToastShort(R.string.tip_start_share);
}
@Override
public void onComplete(SHARE_MEDIA arg0, int arg1,
SocializeEntity arg2) {
AppContext.showToastShort(R.string.tip_share_done);
}
});
}
开发者ID:blueelwang,项目名称:oschina-app,代码行数:17,代码来源:BaseDetailFragment.java
示例9: shareToQQ
import com.umeng.socialize.bean.SocializeEntity; //导入依赖的package包/类
protected void shareToQQ(SHARE_MEDIA media) {
UMQQSsoHandler qqSsoHandler = new UMQQSsoHandler(getActivity(),
Constants.QQ_APPID, Constants.QQ_APPKEY);
qqSsoHandler.setTargetUrl(getShareUrl());
qqSsoHandler.setTitle(getShareContent());
qqSsoHandler.addToSocialSDK();
mController.setShareContent(getShareContent());
mController.postShare(getActivity(), media, new SnsPostListener() {
@Override
public void onStart() {
AppContext.showToastShort(R.string.tip_start_share);
}
@Override
public void onComplete(SHARE_MEDIA arg0, int arg1,
SocializeEntity arg2) {
AppContext.showToastShort(R.string.tip_share_done);
}
});
}
开发者ID:blueelwang,项目名称:oschina-app,代码行数:22,代码来源:BaseDetailFragment.java
示例10: shareContent
import com.umeng.socialize.bean.SocializeEntity; //导入依赖的package包/类
private void shareContent(SHARE_MEDIA media) {
mController.setShareContent(getShareContent() + getShareUrl());
mController.directShare(getActivity(), media, new SnsPostListener() {
@Override
public void onStart() {
AppContext.showToastShort(R.string.tip_start_share);
}
@Override
public void onComplete(SHARE_MEDIA arg0, int arg1,
SocializeEntity arg2) {
AppContext.showToastShort(R.string.tip_share_done);
}
});
}
开发者ID:447491480,项目名称:ima_intellj,代码行数:17,代码来源:BaseDetailFragment.java
示例11: shareToQQ
import com.umeng.socialize.bean.SocializeEntity; //导入依赖的package包/类
protected void shareToQQ(SHARE_MEDIA media) {
UMQQSsoHandler qqSsoHandler = new UMQQSsoHandler(getActivity(),
Constants.QQ_APPID, Constants.QQ_APPKEY);
qqSsoHandler.setTargetUrl(getShareUrl());
qqSsoHandler.setTitle(getShareContent());
qqSsoHandler.addToSocialSDK();
mController.setShareContent(getShareContent());
mController.postShare(getActivity(), media, new SnsPostListener() {
@Override
public void onStart() {
AppContext.showToastShort(R.string.tip_start_share);
}
@Override
public void onComplete(SHARE_MEDIA arg0, int arg1,
SocializeEntity arg2) {
AppContext.showToastShort(R.string.tip_share_done);
}
});
}
开发者ID:447491480,项目名称:ima_intellj,代码行数:22,代码来源:BaseDetailFragment.java
示例12: initAcitonBar
import com.umeng.socialize.bean.SocializeEntity; //导入依赖的package包/类
protected static UMSocialService initAcitonBar(Context context) {
UMSocialService controller = UMServiceFactory.getUMSocialService(name_S, /** 相对于为事件ID,事件名字**/
RequestType.SOCIAL);
if (!controller.getEntity().initialized) { //判断是否初始化
controller.setShareContent("我非常喜欢" +name_S +",协会招新之际, 大家也来支持一下《番职通》,全面为你介绍所有协会的情况。http://blog.sina.com.cn/steven2947"); //设置默认分享内容
controller.setShareMedia(new UMImage(context, Img));
controller.initEntity(context, new SocializeClientListener() {
@Override
public void onStart() {
}
@Override
public void onComplete(int status, SocializeEntity entity) {
matchEntity(entity);
}
});
} else {
matchEntity( controller.getEntity());
}
return controller;
}
开发者ID:steven2947,项目名称:NeXT_pyp,代码行数:26,代码来源:Show_simple_Asso.java
示例13: matchEntity
import com.umeng.socialize.bean.SocializeEntity; //导入依赖的package包/类
private synchronized static void matchEntity( SocializeEntity entity) {
if (entity != null) {
like_num.setText(entity.getLikeCount() + "");
comment_num.setText("" + entity.getCommentCount());
share_num.setText("" + entity.getShareCount());
//设置图标
if(entity.getLikeStatus().toString() == "1"){
//设置喜欢选择
like_icon.setImageDrawable(mContext.getResources().getDrawable(R.drawable.bg_like_btn_on));
}else if(entity.getLikeStatus().toString() == "0"){
like_icon.setImageDrawable(mContext.getResources().getDrawable(R.drawable.bg_like_btn_off));
}
}
}
开发者ID:steven2947,项目名称:NeXT_pyp,代码行数:17,代码来源:Show_simple_Asso.java
示例14: onComplete
import com.umeng.socialize.bean.SocializeEntity; //导入依赖的package包/类
public void onComplete(int i, SocializeEntity socializeEntity) {
if (i == 200) {
this.a.b.loadUrl(this.a.a(socializeEntity, this.a.m));
return;
}
if (this.a.c != null) {
this.a.c.onError(new SocializeException("can`t initlized entity.."), this.a.m);
}
this.a.b.loadData("Error:502 Please make sure your network is available.", "text/html",
"UTF-8");
}
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:12,代码来源:r.java
示例15: j
import com.umeng.socialize.bean.SocializeEntity; //导入依赖的package包/类
public j(Activity activity, SocializeEntity socializeEntity, SHARE_MEDIA share_media,
UMAuthListener uMAuthListener) {
super(activity, ResContainer.getResourceId(activity.getApplicationContext(), ResType
.STYLE, "umeng_socialize_popup_dialog"));
this.k = activity.getApplicationContext();
this.l = activity;
this.c = uMAuthListener;
this.m = share_media;
this.i = UMServiceFactory.getUMSocialService(socializeEntity.mDescriptor);
SocializeConfig config = this.i.getConfig();
this.n = config.getFollowFids(share_media);
this.o = config.getOauthDialogFollowListener();
switch (s.a[share_media.ordinal()]) {
case 1:
this.j = p;
break;
case 2:
this.j = q;
break;
case 3:
this.j = r;
break;
case 4:
this.j = s;
break;
}
LayoutInflater layoutInflater = (LayoutInflater) this.l.getSystemService("layout_inflater");
int resourceId = ResContainer.getResourceId(this.k, ResType.LAYOUT,
"umeng_socialize_oauth_dialog");
int resourceId2 = ResContainer.getResourceId(this.k, ResType.ID, "umeng_socialize_follow");
int resourceId3 = ResContainer.getResourceId(this.k, ResType.ID,
"umeng_socialize_follow_check");
this.d = layoutInflater.inflate(resourceId, null);
View findViewById = this.d.findViewById(resourceId2);
this.f = (CheckBox) this.d.findViewById(resourceId3);
Object obj = (this.n == null || this.n.size() <= 0) ? null : 1;
Object obj2 = (share_media == SHARE_MEDIA.SINA || share_media == SHARE_MEDIA.TENCENT) ? 1
: null;
if (obj == null || obj2 == null) {
findViewById.setVisibility(8);
} else {
findViewById.setVisibility(0);
}
int resourceId4 = ResContainer.getResourceId(this.k, ResType.ID, "progress_bar_parent");
resourceId = ResContainer.getResourceId(this.k, ResType.ID,
"umeng_socialize_title_bar_leftBt");
resourceId2 = ResContainer.getResourceId(this.k, ResType.ID,
"umeng_socialize_title_bar_rightBt");
resourceId3 = ResContainer.getResourceId(this.k, ResType.ID,
"umeng_socialize_title_bar_middleTv");
int resourceId5 = ResContainer.getResourceId(this.k, ResType.ID,
"umeng_socialize_titlebar");
this.e = this.d.findViewById(resourceId4);
this.e.setVisibility(0);
((Button) this.d.findViewById(resourceId)).setOnClickListener(new l(this));
this.d.findViewById(resourceId2).setVisibility(8);
((TextView) this.d.findViewById(resourceId3)).setText("授权" + SocialSNSHelper.getShowWord
(this.k, share_media));
b();
View mVar = new m(this, this.k, findViewById, this.d.findViewById(resourceId5),
SocializeUtils.dip2Px(this.k, 200.0f));
mVar.addView(this.d, -1, -1);
setContentView(mVar);
LayoutParams attributes = getWindow().getAttributes();
if (SocializeUtils.isFloatWindowStyle(this.k)) {
int[] floatWindowSize = SocializeUtils.getFloatWindowSize(this.k);
attributes.width = floatWindowSize[0];
attributes.height = floatWindowSize[1];
resourceId4 = ResContainer.getResourceId(getContext(), ResType.STYLE,
"umeng_socialize_dialog_anim_fade");
} else {
attributes.height = -1;
attributes.width = -1;
resourceId4 = ResContainer.getResourceId(getContext(), ResType.STYLE,
"umeng_socialize_dialog_animations");
}
attributes.gravity = 17;
getWindow().getAttributes().windowAnimations = resourceId4;
}
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:80,代码来源:j.java
示例16: show
import com.umeng.socialize.bean.SocializeEntity; //导入依赖的package包/类
public void show() {
super.show();
this.h = null;
SocializeEntity entity = this.i.getEntity();
if (entity.mInitialized) {
this.b.loadUrl(a(entity, this.m));
return;
}
this.i.initEntity(this.k, new r(this));
}
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:11,代码来源:j.java
示例17: onComplete
import com.umeng.socialize.bean.SocializeEntity; //导入依赖的package包/类
public void onComplete(int i, SocializeEntity socializeEntity) {
this.b.a.c();
if (i == 200) {
this.b.dismissLoginDialog();
if (this.b.f != null) {
this.b.f.loginSuccessed(this.a, false);
}
} else if (this.b.f != null) {
this.b.f.loginFailed(i);
}
}
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:12,代码来源:g.java
示例18: onComplete
import com.umeng.socialize.bean.SocializeEntity; //导入依赖的package包/类
public void onComplete(int i, SocializeEntity socializeEntity) {
this.a.a.c();
if (i == 200) {
LoginInfoHelp.setGuest(this.a.b, true);
this.a.dismissLoginDialog();
if (this.a.f != null) {
this.a.f.loginSuccessed(null, false);
}
} else if (this.a.f != null) {
this.a.f.loginFailed(i);
}
}
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:13,代码来源:h.java
示例19: createSnsPostListener
import com.umeng.socialize.bean.SocializeEntity; //导入依赖的package包/类
public static SnsPostListener createSnsPostListener() {
return new SnsPostListener() {
public void onStart() {
}
public void onComplete(SHARE_MEDIA share_media, int i, SocializeEntity
socializeEntity) {
}
};
}
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:11,代码来源:ListenerUtils.java
示例20: a
import com.umeng.socialize.bean.SocializeEntity; //导入依赖的package包/类
public Object a(String str, SocializeEntity socializeEntity, Object... objArr) {
try {
Class cls = Class.forName(str);
if (this == USER_CENTER) {
return cls.getConstructor(new Class[]{SocializeEntity.class, AuthService
.class}).newInstance(new Object[]{socializeEntity, objArr[0]});
}
return cls.getConstructor(new Class[]{SocializeEntity.class}).newInstance(new
Object[]{socializeEntity});
} catch (Exception e) {
return b(socializeEntity, objArr);
}
}
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:14,代码来源:d.java
注:本文中的com.umeng.socialize.bean.SocializeEntity类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论