当前位置: 首页>>代码示例>>Java>>正文


Java UMSocialService类代码示例

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


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

示例1: sendAnalytic

import com.umeng.socialize.controller.UMSocialService; //导入依赖的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);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:17,代码来源:SocializeUtils.java

示例2: setShareBtn

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

示例3: initAcitonBar

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

示例4: aj

import com.umeng.socialize.controller.UMSocialService; //导入依赖的package包/类
public aj(Context context, b bVar, UMSocialService uMSocialService) {
    super(bVar, -1, -1, false);
    this.a = context;
    this.b = bVar;
    this.c = uMSocialService;
    this.b.a(a());
    setAnimationStyle(ResContainer.getResourceId(this.a, ResType.STYLE,
            "umeng_socialize_shareboard_animation"));
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:10,代码来源:aj.java

示例5: getAllPlatforms

import com.umeng.socialize.controller.UMSocialService; //导入依赖的package包/类
public List<SnsPlatform> getAllPlatforms(Context context, UMSocialService uMSocialService) {
    u.clear();
    SocialSNSHelper.getSupprotCloudPlatforms(context, this);
    u.addAll(t.values());
    for (SnsPlatform entityDescriptor : u) {
        entityDescriptor.setEntityDescriptor(uMSocialService.getEntity().mDescriptor);
    }
    b();
    c();
    return u;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:12,代码来源:SocializeConfig.java

示例6: UMImage

import com.umeng.socialize.controller.UMSocialService; //导入依赖的package包/类
private void 自定义分享(Context context, final UMSocialService mController, SHARE_MEDIA var, BaseShareContent content) {
    //        WeiXinShareContent weixinContent = new WeiXinShareContent();
    //设置分享文字
    content.setShareContent("唉~!可惜了.下载地址:www.xxxxx.com");
    //设置title
    content.setTitle("屠龙宝刀,点击就送!");
    //设置分享内容跳转URL
    content.setTargetUrl("www.baidu.com");
    //设置分享图片
    UMImage img = new UMImage(context, R.mipmap.ic_launcher);

    content.setShareImage(img);
    mController.setShareMedia(content);
    setShareBtn(context, mController, var);
}
 
开发者ID:paradoxie,项目名称:UmengSocialLibrary,代码行数:16,代码来源:MainActivity.java

示例7: getUMSocialService

import com.umeng.socialize.controller.UMSocialService; //导入依赖的package包/类
public UMSocialService getUMSocialService() {
    init();
    return mController;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:5,代码来源:ShareHelper.java

示例8: SNSLogin

import com.umeng.socialize.controller.UMSocialService; //导入依赖的package包/类
public SNSLogin(BaseActivity activity, UMSocialService controller, JsonCallback listener) {
    this.mActivity = activity;
    this.mController = controller;
    this.mListener = listener;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:6,代码来源:SNSLogin.java

示例9: getShareController

import com.umeng.socialize.controller.UMSocialService; //导入依赖的package包/类
public static UMSocialService getShareController() {
    return mController;
}
 
开发者ID:huang303513,项目名称:Coding-Android,代码行数:4,代码来源:CustomShareBoard.java

示例10: onShareItemSelected

import com.umeng.socialize.controller.UMSocialService; //导入依赖的package包/类
public void onShareItemSelected() {
    final UMSocialService socialService = UMServiceFactory.getUMSocialService("com.umeng.share");
    // Remove Tencent Weibo and QZone from share panel.
    socialService.getConfig().removePlatform(SHARE_MEDIA.TENCENT);
    socialService.getConfig().removePlatform(SHARE_MEDIA.QZONE);

    String webLink = this.topicInfo.getLinks().getWebURL();
    String shareContent = this.topicInfo.getTitle() + " " + webLink;
    String title = getString(R.string.share_topic, this.topicInfo.getUser().getData().getName());

    socialService.setShareContent(shareContent);

    if (!BuildConfig.QQ_APPID.isEmpty() && !BuildConfig.QQ_APPKEY.isEmpty()) {
        // Add QQ
        UMQQSsoHandler qqSsoHandler = new UMQQSsoHandler(this, BuildConfig.QQ_APPID, BuildConfig.QQ_APPKEY);
        qqSsoHandler.addToSocialSDK();

        QQShareContent qqShareContent = new QQShareContent();
        qqShareContent.setShareContent(shareContent);
        qqShareContent.setTitle(title);
        qqShareContent.setTargetUrl(this.topicInfo.getLinks().getWebURL());

        socialService.setShareMedia(qqShareContent);
    } else {
        socialService.getConfig().removePlatform(SHARE_MEDIA.QQ);
    }

    if (!BuildConfig.WX_APPID.isEmpty() && !BuildConfig.WX_SECRET.isEmpty()) {
        // Add WeiChat
        UMWXHandler wxHandler = new UMWXHandler(this, BuildConfig.WX_APPID, BuildConfig.WX_SECRET);
        wxHandler.addToSocialSDK();

        // Add WeChat Circle
        UMWXHandler wxCircleHandler = new UMWXHandler(this, BuildConfig.WX_APPID, BuildConfig.WX_SECRET);
        wxCircleHandler.setToCircle(true);
        wxCircleHandler.addToSocialSDK();

        //设置微信分享内容
        WeiXinShareContent weixinContent = new WeiXinShareContent();
        weixinContent.setShareContent(shareContent);
        weixinContent.setTitle(title);
        weixinContent.setTargetUrl(this.topicInfo.getLinks().getWebURL());
        weixinContent.setShareImage(new UMImage(this, topicInfo.getUser().getData().getAvatar()));
        socialService.setShareMedia(weixinContent);

        Logger.d(topicInfo.getUser().getData().getAvatar());
        //设置微信朋友圈分享内容
        CircleShareContent circleMedia = new CircleShareContent();
        circleMedia.setShareContent(shareContent);
        circleMedia.setTitle(title);
        circleMedia.setTargetUrl(this.topicInfo.getLinks().getWebURL());
        circleMedia.setShareImage(new UMImage(this, topicInfo.getUser().getData().getAvatar()));
        socialService.setShareMedia(circleMedia);
    }else{
        socialService.getConfig().removePlatform(SHARE_MEDIA.WEIXIN, SHARE_MEDIA.WEIXIN_CIRCLE);
    }

    socialService.openShare(this, false);
}
 
开发者ID:CycloneAxe,项目名称:phphub-android,代码行数:60,代码来源:TopicDetailsActivity.java


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