當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。