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


Java RequestType类代码示例

本文整理汇总了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);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:17,代码来源:SocializeUtils.java

示例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();
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:35,代码来源:UMTencentSsoHandler.java


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