• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java SnsPostListener类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.umeng.socialize.controller.listener.SocializeListeners.SnsPostListener的典型用法代码示例。如果您正苦于以下问题:Java SnsPostListener类的具体用法?Java SnsPostListener怎么用?Java SnsPostListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SnsPostListener类属于com.umeng.socialize.controller.listener.SocializeListeners包,在下文中一共展示了SnsPostListener类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: dispatchKeyEvent

import com.umeng.socialize.controller.listener.SocializeListeners.SnsPostListener; //导入依赖的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


示例2: openShare

import com.umeng.socialize.controller.listener.SocializeListeners.SnsPostListener; //导入依赖的package包/类
public void openShare(Activity activity, SnsPostListener snsPostListener) {
    a();
    if (e(activity)) {
        a(activity);
        this.a.addStatisticsData(activity, SHARE_MEDIA.GENERIC, 1);
        this.f = null;
        b bVar = new b(activity);
        bVar.setLayoutParams(new LayoutParams(-1, -1));
        this.f = new aj(activity, bVar, UMServiceFactory.getUMSocialService(this.a
                .mDescriptor));
        this.f.setFocusable(true);
        this.f.setBackgroundDrawable(new BitmapDrawable());
        this.f.a(this.i);
        bVar.a(new n(this));
        if (snsPostListener != null) {
            this.c.registerListener(snsPostListener);
        }
        if (this.g) {
            d(activity);
        } else {
            this.f.showAtLocation(activity.getWindow().getDecorView(), 80, 0, 0);
        }
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:25,代码来源:m.java


示例3: postShare

import com.umeng.socialize.controller.listener.SocializeListeners.SnsPostListener; //导入依赖的package包/类
public void postShare(Context context, SHARE_MEDIA share_media, SnsPostListener
        snsPostListener) {
    if (SocializeUtils.platformCheck(context, share_media)) {
        if (snsPostListener == null) {
            snsPostListener = ListenerUtils.createSnsPostListener();
        }
        a();
        this.a.addStatisticsData(context, share_media, 2);
        SocializeConfig.setSelectedPlatfrom(share_media);
        b(context.getApplicationContext());
        this.c.registerListener(d);
        if (share_media.isCustomPlatform()) {
            c(context, share_media, snsPostListener);
        } else {
            a(context, share_media, snsPostListener);
        }
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:19,代码来源:m.java


示例4: a

import com.umeng.socialize.controller.listener.SocializeListeners.SnsPostListener; //导入依赖的package包/类
private void a(Context context, SHARE_MEDIA share_media, SnsPostListener snsPostListener) {
    Intent intent = new Intent(context, ShareActivity.class);
    intent.putExtra(SocializeProtocolConstants.PROTOCOL_KEY_DESCRIPTOR, this.a.mDescriptor);
    intent.putExtra("sns", share_media.toString());
    if (!OauthHelper.isAuthenticatedAndTokenNotExpired(context, share_media)) {
        Dialog createProgressDialog = LoadingDialog.createProgressDialog(context,
                share_media, "", false);
        UMAuthListener pVar = new p(this, createProgressDialog, context, snsPostListener,
                intent);
        SocializeUtils.safeShowDialog(createProgressDialog);
        this.b.doOauthVerify(context, share_media, pVar);
    } else if (this.e) {
        String usid = OauthHelper.getUsid(context, share_media);
        this.e = false;
        postShare(context, usid, share_media, snsPostListener);
    } else {
        if (this.c.contains(snsPostListener) <= 0) {
            this.c.registerListener(snsPostListener);
        }
        context.startActivity(intent);
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:23,代码来源:m.java


示例5: directShare

import com.umeng.socialize.controller.listener.SocializeListeners.SnsPostListener; //导入依赖的package包/类
public void directShare(Context context, SHARE_MEDIA share_media, SnsPostListener
        snsPostListener) {
    if (SocializeUtils.platformCheck(context, share_media)) {
        if (snsPostListener == null) {
            snsPostListener = ListenerUtils.createSnsPostListener();
        }
        a();
        this.a.addStatisticsData(context, share_media, 8);
        if (this.a.getShareType() == ShareType.NORMAL) {
            SocializeConfig.setSelectedPlatfrom(share_media);
        } else {
            SocializeConfig.setSelectedPlatfrom(SHARE_MEDIA.GENERIC);
        }
        b(context.getApplicationContext());
        this.c.registerListener(d);
        if (share_media.isCustomPlatform()) {
            c(context, share_media, snsPostListener);
        } else {
            b(context, share_media, snsPostListener);
        }
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:23,代码来源:m.java


示例6: a

import com.umeng.socialize.controller.listener.SocializeListeners.SnsPostListener; //导入依赖的package包/类
protected void a(MultiStatus multiStatus) {
    super.onPostExecute(multiStatus);
    SHARE_MEDIA convertToEmun = SHARE_MEDIA.convertToEmun(this.b);
    int platformStatus = multiStatus.getPlatformStatus(convertToEmun);
    if (platformStatus != 200) {
        SocializeUtils.errorHanding(this.d, convertToEmun, Integer.valueOf(platformStatus));
    }
    if (this.a != null) {
        this.a.onComplete(convertToEmun, platformStatus, this.g.a);
    }
    if (this.g.a.isFireCallback()) {
        this.g.c.fireAllListenersOnComplete(SnsPostListener.class, convertToEmun,
                platformStatus, this.g.a);
    }
    m.a(this.g, this.d, (InitializeController) this.g.b);
    this.g.c.cleanListeners();
    m.d(this.g);
    this.g.a.setFireCallback(false);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:20,代码来源:q.java


示例7: shareToQQ

import com.umeng.socialize.controller.listener.SocializeListeners.SnsPostListener; //导入依赖的package包/类
public void shareToQQ() {
    if (validTencent()) {
        this.mSocializeConfig.fireAllListenersOnStart(SnsPostListener.class);
        String path = (String) this.mExtraData.get("image_path_local");
        if (isLoadImageAsync()) {
            loadImage(this.mContext, (String) this.mExtraData.get("image_path_url"));
            return;
        } else if (isUploadImageAsync(path, this.mShareType)) {
            UMImage image = new UMImage(this.mContext, new File(path));
            Log.w(TAG, "未安装QQ客户端的情况下,QQ不支持音频,图文是为本地图片的分享。此时将上传本地图片到相册,请确保在QQ互联申请了upload_pic权限" +
                    ".");
            authorize(this.mActivity, createUploadAuthListener(image));
            return;
        } else {
            defaultShareToQQ();
            return;
        }
    }
    Log.d(TAG, "QQ平台还没有授权");
    createAuthListener();
    authorize(this.mActivity, this.mAuthListener);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:23,代码来源:UMQQSsoHandler.java


示例8: getShareToQZoneListener

import com.umeng.socialize.controller.listener.SocializeListeners.SnsPostListener; //导入依赖的package包/类
private IUiListener getShareToQZoneListener() {
    return new IUiListener() {
        public void onError(UiError error) {
            Log.e("IUiListener", "error code : " + error.errorCode + "       error message:"
                    + error.errorMessage);
            QZoneSsoHandler.this.mSocializeConfig.fireAllListenersOnComplete(SnsPostListener
                    .class, SHARE_MEDIA.QZONE, StatusCode.ST_CODE_ERROR, UMSsoHandler.mEntity);
        }

        public void onCancel() {
            QZoneSsoHandler.this.mSocializeConfig.fireAllListenersOnComplete(SnsPostListener
                    .class, SHARE_MEDIA.QZONE, StatusCode.ST_CODE_ERROR_CANCEL, UMSsoHandler
                    .mEntity);
        }

        public void onComplete(Object response) {
            int code = 200;
            if (QZoneSsoHandler.this.getResponseCode(response) != 0) {
                code = StatusCode.ST_CODE_ERROR;
            }
            QZoneSsoHandler.this.mSocializeConfig.fireAllListenersOnComplete(SnsPostListener
                    .class, SHARE_MEDIA.QZONE, code, UMSsoHandler.mEntity);
            QZoneSsoHandler.this.sendReport(true);
        }
    };
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:27,代码来源:QZoneSsoHandler.java


示例9: handleOnClick

import com.umeng.socialize.controller.listener.SocializeListeners.SnsPostListener; //导入依赖的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


示例10: a

import com.umeng.socialize.controller.listener.SocializeListeners.SnsPostListener; //导入依赖的package包/类
private boolean a(ICallbackListener iCallbackListener, int i) throws SocializeException {
    Class cls;
    if (iCallbackListener instanceof SnsPostListener) {
        cls = SnsPostListener.class;
    } else if (iCallbackListener instanceof SocializeClientListener) {
        cls = SocializeClientListener.class;
    } else if (iCallbackListener instanceof MulStatusListener) {
        cls = MulStatusListener.class;
    } else if (iCallbackListener instanceof UMAuthListener) {
        cls = UMAuthListener.class;
    } else {
        throw new SocializeException("unknow listener`s class.");
    }
    if (29 < getListener(cls).length) {
        return true;
    }
    return false;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:19,代码来源:CallbackConfig.java


示例11: shareTo

import com.umeng.socialize.controller.listener.SocializeListeners.SnsPostListener; //导入依赖的package包/类
public boolean shareTo() {
    int i = 0;
    this.isFromAuth = false;
    this.mSocializeConfig.fireAllListenersOnStart(SnsPostListener.class);
    Req req = new Req();
    req.transaction = buildTransaction(this.mShareType);
    req.message = this.mWxMediaMessage;
    if (this.isWXSceneFavorite) {
        req.scene = 2;
    } else {
        if (this.isToCircle) {
            i = 1;
        }
        req.scene = i;
    }
    return this.mWXApi.sendReq(req);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:18,代码来源:UMWXHandler.java


示例12: sendReport

import com.umeng.socialize.controller.listener.SocializeListeners.SnsPostListener; //导入依赖的package包/类
protected void sendReport(boolean result) {
    int statusCode = StatusCode.ST_CODE_ERROR_WEIXIN;
    SHARE_MEDIA platform = this.isToCircle ? SHARE_MEDIA.WEIXIN_CIRCLE : SHARE_MEDIA.WEIXIN;
    if (result) {
        try {
            StatisticsDataUtils.addStatisticsData(this.mContext, platform, 17);
        } catch (Exception e) {
        }
        statusCode = 200;
    }
    if (!haveCallback(this.mContext) || isBlackList(this.mContext)) {
        this.mSocializeConfig.fireAllListenersOnComplete(SnsPostListener.class, platform,
                statusCode, mEntity);
        if (result && mEntity != null) {
            SocializeUtils.sendAnalytic(this.mContext, mEntity.mDescriptor, this.mReportDesc,
                    this.mShareMedia, this.isToCircle ? "wxtimeline" : "wxsession");
        }
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:20,代码来源:UMWXHandler.java


示例13: registerCallback

import com.umeng.socialize.controller.listener.SocializeListeners.SnsPostListener; //导入依赖的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


示例14: shareContent

import com.umeng.socialize.controller.listener.SocializeListeners.SnsPostListener; //导入依赖的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


示例15: shareToQQ

import com.umeng.socialize.controller.listener.SocializeListeners.SnsPostListener; //导入依赖的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


示例16: shareContent

import com.umeng.socialize.controller.listener.SocializeListeners.SnsPostListener; //导入依赖的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


示例17: shareToQQ

import com.umeng.socialize.controller.listener.SocializeListeners.SnsPostListener; //导入依赖的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


示例18: onClick

import com.umeng.socialize.controller.listener.SocializeListeners.SnsPostListener; //导入依赖的package包/类
public void onClick(View view) {
    this.a.d.setClickable(false);
    if (this.a.v != null) {
        this.a.v.unregisterListener(m.d);
        this.a.E.fireAllListenersOnComplete(SnsPostListener.class, this.a.x, StatusCode
                .ST_CODE_ERROR_CANCEL, this.a.q);
        this.a.v.getConfig().cleanListeners();
        this.a.a();
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:11,代码来源:ad.java


示例19: createSnsPostListener

import com.umeng.socialize.controller.listener.SocializeListeners.SnsPostListener; //导入依赖的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: t

import com.umeng.socialize.controller.listener.SocializeListeners.SnsPostListener; //导入依赖的package包/类
t(m mVar, SnsPostListener snsPostListener, SHARE_MEDIA share_media, String str, String str2,
  Context context) {
    this.f = mVar;
    this.a = snsPostListener;
    this.b = share_media;
    this.c = str;
    this.d = str2;
    this.e = context;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:10,代码来源:t.java



注:本文中的com.umeng.socialize.controller.listener.SocializeListeners.SnsPostListener类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java MapEvent类代码示例发布时间:2022-05-22
下一篇:
Java PropertiesClientConfig类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap