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


Java IUiListener类代码示例

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


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

示例1: shareWebPageQQFriend

import com.tencent.tauth.IUiListener; //导入依赖的package包/类
public static void shareWebPageQQFriend(final Activity activity,final String url,final String title,final String desc,final String img,IUiListener listener ){
    if (api == null) {
        api = Tencent.createInstance(APP_ID, MainApp.getContext());
    }

    if(api==null){
        return;
    }
    final Bundle params = new Bundle();
    params.putInt(QQShare.SHARE_TO_QQ_KEY_TYPE, QQShare.SHARE_TO_QQ_TYPE_DEFAULT);
    params.putString(QQShare.SHARE_TO_QQ_TITLE, title);
    params.putString(QQShare.SHARE_TO_QQ_SUMMARY,  desc);
    params.putString(QQShare.SHARE_TO_QQ_TARGET_URL,  url);

    String postimg=img;
    if(StringUtils.isEmpty(img)) {
        postimg="http://youkes.oss.aliyuncs.com/icon/icon_96.png";
    }

    params.putString(QQShare.SHARE_TO_QQ_IMAGE_URL,postimg);
    params.putString(QQShare.SHARE_TO_QQ_APP_NAME, "优分享");

    api.shareToQQ(activity, params,listener);

}
 
开发者ID:NewCasino,项目名称:browser,代码行数:26,代码来源:QQShareApi.java

示例2: shareAppQQ

import com.tencent.tauth.IUiListener; //导入依赖的package包/类
public static void shareAppQQ(final Activity activity,IUiListener listener) {
    if (api == null) {
        api = Tencent.createInstance(APP_ID, MainApp.getContext());
    }

    if(api==null){
        return;
    }

    final Bundle params = new Bundle();
    params.putInt(QQShare.SHARE_TO_QQ_KEY_TYPE, QQShare.SHARE_TO_QQ_TYPE_APP);
    params.putString(QQShare.SHARE_TO_QQ_TITLE, "优分享");
    params.putString(QQShare.SHARE_TO_QQ_SUMMARY,  "优分享是一个内嵌移动浏览器的网页图片社交分享软件。\n" +
            "优分享可以向你的朋友家人收发文字,语音,动态图片,视频等信息。");
    params.putString(QQShare.SHARE_TO_QQ_IMAGE_URL, "http://youkes.oss.aliyuncs.com/icon/icon_96.png");
    params.putString(QQShare.SHARE_TO_QQ_APP_NAME,  "优分享");
    api.shareToQQ(activity, params, listener);
}
 
开发者ID:NewCasino,项目名称:browser,代码行数:19,代码来源:QQShareApi.java

示例3: getShareToQZoneListener

import com.tencent.tauth.IUiListener; //导入依赖的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

示例4: onActivityResult

import com.tencent.tauth.IUiListener; //导入依赖的package包/类
public void onActivityResult(Activity activity, int i, int i2, Intent intent) {
    IUiListener iUiListener;
    for (ApiTask apiTask : this.mTaskList) {
        if (apiTask.mRequestCode == i) {
            IUiListener iUiListener2 = apiTask.mListener;
            this.mTaskList.remove(apiTask);
            iUiListener = iUiListener2;
            break;
        }
    }
    iUiListener = null;
    if (iUiListener == null) {
        f.b(TAG, "BaseApi--onActivityResult-- listener == null");
        AssistActivity.setResultDataForLogin(activity, intent);
        return;
    }
    if (i2 == -1) {
        handleDataToListener(intent, iUiListener);
    } else {
        f.b(f.d, "OpenUi, onActivityResult, Constants.ACTIVITY_CANCEL");
        iUiListener.onCancel();
    }
    f.b();
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:25,代码来源:BaseApi.java

示例5: loginWithOEM

import com.tencent.tauth.IUiListener; //导入依赖的package包/类
@Deprecated
public int loginWithOEM(Activity activity, String str, IUiListener iUiListener, String str2, String str3, String str4) {
    f.c(f.d, "loginWithOEM");
    BaseApi.isOEM = true;
    if (str2.equals("")) {
        str2 = "null";
    }
    if (str3.equals("")) {
        str3 = "null";
    }
    if (str4.equals("")) {
        str4 = "null";
    }
    BaseApi.installChannel = str3;
    BaseApi.registerChannel = str2;
    BaseApi.businessId = str4;
    return this.a.doLogin(activity, str, iUiListener);
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:19,代码来源:QQAuth.java

示例6: searchNearby

import com.tencent.tauth.IUiListener; //导入依赖的package包/类
public void searchNearby(Activity activity, Bundle bundle, IUiListener iUiListener) {
    if (c()) {
        this.e = bundle;
        this.f = iUiListener;
        this.b.post(new Runnable(this) {
            final /* synthetic */ LocationApi a;

            {
                this.a = r1;
            }

            public void run() {
                if (this.a.d.a()) {
                    Message.obtain(this.a.c, 103).sendToTarget();
                } else {
                    Message.obtain(this.a.c, 104).sendToTarget();
                }
            }
        });
    } else if (iUiListener != null) {
        iUiListener.onComplete(d());
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:24,代码来源:LocationApi.java

示例7: addAlbum

import com.tencent.tauth.IUiListener; //导入依赖的package包/类
public void addAlbum(String str, String str2, AlbumSecurity albumSecurity, String str3, String str4, IUiListener iUiListener) {
    Bundle composeCGIParams = composeCGIParams();
    String str5 = "albumname";
    if (str == null) {
        str = "";
    }
    composeCGIParams.putString(str5, str);
    str5 = "albumdesc";
    if (str2 == null) {
        str2 = "";
    }
    composeCGIParams.putString(str5, str2);
    composeCGIParams.putString("priv", albumSecurity == null ? AlbumSecurity.publicToAll.getSecurity() : albumSecurity.getSecurity());
    str5 = "question";
    if (str3 == null) {
        str3 = "";
    }
    composeCGIParams.putString(str5, str3);
    str5 = "answer";
    if (str4 == null) {
        str4 = "";
    }
    composeCGIParams.putString(str5, str4);
    HttpUtils.requestAsync(this.mToken, Global.getContext(), "photo/add_album", composeCGIParams, "POST", new TempRequestListener(iUiListener));
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:26,代码来源:Albums.java

示例8: PKDialog

import com.tencent.tauth.IUiListener; //导入依赖的package包/类
public PKDialog(Context context, String str, String str2, IUiListener iUiListener, QQToken qQToken) {
    super(context, 16973840);
    this.mWeakContext = new WeakReference(context);
    this.mUrl = str2;
    this.mListener = new OnTimeListener(context, str, str2, qQToken.getAppId(), iUiListener);
    this.mHandler = new THandler(this.mListener, context.getMainLooper());
    this.listener = iUiListener;
    this.mWebviewHeight = Math.round(185.0f * context.getResources().getDisplayMetrics().density);
    f.e(TAG, "density=" + context.getResources().getDisplayMetrics().density + "; webviewHeight=" + this.mWebviewHeight);
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:11,代码来源:PKDialog.java

示例9: qqLogin

import com.tencent.tauth.IUiListener; //导入依赖的package包/类
public static void qqLogin(final BaseActivity activity, final String url, final JsonCallback
        callback) {
    mTencent.login((Activity) activity, BuildConfig.PLATFORM, new IUiListener() {
        public void onComplete(Object response) {
            if (response == null) {
                Helper.showToast((int) R.string.cb);
                return;
            }
            JSONObject jsonResponse = (JSONObject) response;
            if (jsonResponse == null || jsonResponse.length() != 0) {
                new UserInfo(activity, SNSLogin.mTencent.getQQToken()).getUserInfo(new
                        BaseUIListener(url, activity, jsonResponse, callback));
            } else {
                Helper.showToast((int) R.string.cb);
            }
        }

        public void onError(UiError e) {
            Helper.showToast((int) R.string.ca);
        }

        public void onCancel() {
            Helper.showToast((int) R.string.c_);
        }
    });
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:27,代码来源:SNSLogin.java

示例10: a

import com.tencent.tauth.IUiListener; //导入依赖的package包/类
private void a(Activity activity, String str, Bundle bundle, IUiListener iUiListener) {
    this.b = activity;
    Intent agentIntentWithTarget = getAgentIntentWithTarget(SocialConstants
            .ACTIVITY_FRIEND_CHOOSER);
    if (agentIntentWithTarget == null) {
        agentIntentWithTarget = getAgentIntentWithTarget(SocialConstants.ACTIVITY_ASK_GIFT);
    }
    bundle.putAll(composeActivityParams());
    if (SocialConstants.ACTION_ASK.equals(str)) {
        bundle.putString("type", SocialConstants.TYPE_REQUEST);
    } else if (SocialConstants.ACTION_GIFT.equals(str)) {
        bundle.putString("type", SocialConstants.TYPE_FREEGIFT);
    }
    a(activity, agentIntentWithTarget, str, bundle, ServerSetting.getInstance().getEnvUrl
            (Global.getContext(), "http://qzs.qq.com/open/mobile/request/sdk_request.html?"),
            iUiListener, false);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:18,代码来源:SocialApiIml.java

示例11: shareQQZone

import com.tencent.tauth.IUiListener; //导入依赖的package包/类
private void shareQQZone(String url,String title,String imageUrl){
	QQShareApi.shareToQzone(this, url, title, "", imageUrl, new IUiListener() {
		@Override
		public void onComplete(Object o) {

		}

		@Override
		public void onError(UiError uiError) {

		}

		@Override
		public void onCancel() {

		}
	});
}
 
开发者ID:Louis19910615,项目名称:youkes_browser,代码行数:19,代码来源:BrowserActivity.java

示例12: reactive

import com.tencent.tauth.IUiListener; //导入依赖的package包/类
public void reactive(Activity activity, Bundle bundle, IUiListener iUiListener) {
    this.b = activity;
    Intent agentIntentWithTarget = getAgentIntentWithTarget(SocialConstants.ACTIVITY_FRIEND_CHOOSER);
    if (agentIntentWithTarget == null) {
        agentIntentWithTarget = getAgentIntentWithTarget(SocialConstants.ACTIVITY_REACTIVE);
    }
    bundle.putAll(composeActivityParams());
    String envUrl = ServerSetting.getInstance().getEnvUrl(Global.getContext(), ServerSetting.DEFAULT_URL_REACTIVE);
    if (agentIntentWithTarget == null && a()) {
        this.mProgressDialog = new ProgressDialog(activity);
        this.mProgressDialog.setMessage("请稍候...");
        this.mProgressDialog.show();
        bundle.putString("type", SocialConstants.TYPE_REACTIVE);
        a(activity, SocialConstants.ACTION_REACTIVE, new a(this, a(bundle, SocialConstants.ACTION_REACTIVE, envUrl, iUiListener)));
        return;
    }
    bundle.putString(SocialConstants.PARAM_SEND_IMG, bundle.getString("img"));
    bundle.putString("type", SocialConstants.TYPE_REACTIVE);
    bundle.remove("img");
    a(activity, agentIntentWithTarget, SocialConstants.ACTION_REACTIVE, bundle, envUrl, iUiListener, false);
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:22,代码来源:SocialApiIml.java

示例13: TDialog

import com.tencent.tauth.IUiListener; //导入依赖的package包/类
public TDialog(Context context, String str, String str2, IUiListener iUiListener, QQToken qQToken) {
    super(context, 16973840);
    this.c = new WeakReference(context);
    this.e = str2;
    this.f = new OnTimeListener(context, str, str2, qQToken.getAppId(), iUiListener);
    this.j = new THandler(this.f, context.getMainLooper());
    this.g = iUiListener;
    this.l = qQToken;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:10,代码来源:TDialog.java

示例14: shareLocalImage

import com.tencent.tauth.IUiListener; //导入依赖的package包/类
private void shareLocalImage(Share share, IUiListener listener, Callback callback) {
    String url = saveShare(share.getThumbBitmap());
    if (TextUtils.isEmpty(url)) return;
    Bundle params = new Bundle();
    params.putString(QQShare.SHARE_TO_QQ_IMAGE_LOCAL_URL, url);
    params.putString(QQShare.SHARE_TO_QQ_APP_NAME, share.getAppName());
    params.putInt(QQShare.SHARE_TO_QQ_KEY_TYPE, QQShare.SHARE_TO_QQ_TYPE_IMAGE);
    //params.putInt(QQShare.SHARE_TO_QQ_EXT_INT, QQShare.SHATOQQF);
    if (tencent != null) {
        try {
            tencent.shareToQQ(activity, params, listener);
            callback.onSuccess();
        } catch (Exception e) {
            callback.onFailed();
        }
    } else {
        callback.onFailed();
    }
}
 
开发者ID:hsj-xiaokang,项目名称:OSchina_resources_android,代码行数:20,代码来源:OpenBuilder.java

示例15: QQLoginInstance

import com.tencent.tauth.IUiListener; //导入依赖的package包/类
public QQLoginInstance(Activity activity, final LoginListener listener,
        final boolean fetchUserInfo) {
    super(activity, listener, fetchUserInfo);
    mTencent = Tencent.createInstance(ShareManager.CONFIG.getQqId(),
            activity.getApplicationContext());
    mLoginListener = listener;
    mIUiListener = new IUiListener() {
        @Override
        public void onComplete(Object o) {
            ShareLogger.i(INFO.QQ_AUTH_SUCCESS);
            try {
                QQToken token = QQToken.parse((JSONObject) o);
                if (fetchUserInfo) {
                    listener.beforeFetchUserInfo(token);
                    fetchUserInfo(token);
                } else {
                    listener.loginSuccess(new LoginResult(LoginPlatform.QQ, token));
                }
            } catch (JSONException e) {
                ShareLogger.i(INFO.ILLEGAL_TOKEN);
                mLoginListener.loginFailure(e);
            }
        }

        @Override
        public void onError(UiError uiError) {
            ShareLogger.i(INFO.QQ_LOGIN_ERROR);
            listener.loginFailure(
                    new Exception("QQError: " + uiError.errorCode + uiError.errorDetail));
        }

        @Override
        public void onCancel() {
            ShareLogger.i(INFO.AUTH_CANCEL);
            listener.loginCancel();
        }
    };
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:39,代码来源:QQLoginInstance.java


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