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


Java UiError类代码示例

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


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

示例1: shareQQZone

import com.tencent.tauth.UiError; //导入依赖的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:NewCasino,项目名称:browser,代码行数:19,代码来源:BrowserActivity.java

示例2: onActivityResult

import com.tencent.tauth.UiError; //导入依赖的package包/类
public void onActivityResult(Activity activity, int i, int i2, Intent intent) {
    if (i2 == -1) {
        int intExtra = intent.getIntExtra(Constants.KEY_ERROR_CODE, 0);
        if (intExtra == 0) {
            String stringExtra = intent.getStringExtra(Constants.KEY_RESPONSE);
            if (stringExtra != null) {
                try {
                    this.a.onComplete(Util.parseJson(stringExtra));
                    return;
                } catch (JSONException e) {
                    this.a.onError(new UiError(-4, Constants.MSG_JSON_ERROR, stringExtra));
                    return;
                }
            }
            this.a.onComplete(new JSONObject());
            return;
        }
        this.a.onError(new UiError(intExtra, intent.getStringExtra(Constants.KEY_ERROR_MSG), intent.getStringExtra(Constants.KEY_ERROR_DETAIL)));
        return;
    }
    this.a.onCancel();
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:23,代码来源:QQAvatar.java

示例3: a

import com.tencent.tauth.UiError; //导入依赖的package包/类
protected void a(final Exception exception) {
    if (exception != null) {
        exception.printStackTrace();
    }
    this.c.c.onError(new UiError(101, "error ", "金券领取时出现异常"));
    if (this.c.g != null) {
        this.c.g.post(new Runnable(this) {
            final /* synthetic */ d b;

            public void run() {
                k kVar = k.INIT;
                if (this.b.b == 0) {
                    kVar = this.b.c.i;
                } else {
                    kVar = this.b.c.j;
                }
                if (kVar == k.WAITTING_BACK_REWARD) {
                    this.b.c.a(this.b.b, k.NORAML);
                    this.b.c.a("领取失败 :" + exception.getClass().getName());
                }
                this.b.c.b(this.b.b);
                this.b.c.d(2000);
            }
        });
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:27,代码来源:TaskGuide.java

示例4: onComplete

import com.tencent.tauth.UiError; //导入依赖的package包/类
public void onComplete(Object obj) {
    JSONObject jSONObject = (JSONObject) obj;
    try {
        List arrayList = new ArrayList();
        JSONObject jSONObject2 = jSONObject.getJSONObject(ShareRequestParam.RESP_UPLOAD_PIC_PARAM_DATA);
        if (!jSONObject2.isNull(WidgetRequestParam.REQ_PARAM_COMMENT_CONTENT)) {
            JSONArray jSONArray = jSONObject2.getJSONArray(WidgetRequestParam.REQ_PARAM_COMMENT_CONTENT);
            for (int i = 0; i < jSONArray.length(); i++) {
                JSONObject jSONObject3 = jSONArray.getJSONObject(i);
                arrayList.add(new WeiyunFile(jSONObject3.getString("file_id"), jSONObject3.getString("file_name"), jSONObject3.getString("file_ctime"), (long) jSONObject3.getInt("file_size")));
            }
        }
        this.mListener.onComplete(arrayList);
    } catch (JSONException e) {
        this.mListener.onError(new UiError(-4, Constants.MSG_JSON_ERROR, jSONObject.toString()));
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:18,代码来源:FileManager.java

示例5: qqLogin

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

示例6: getShareToQZoneListener

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

示例7: handleMessage

import com.tencent.tauth.UiError; //导入依赖的package包/类
@Override
public void handleMessage(Message msg) {
    switch (msg.what) {
        case ON_COMPLETE:
            JSONObject response = (JSONObject)msg.obj;
            Toast.makeText(mContext, "onComplete == " +response.toString(), Toast.LENGTH_SHORT).show();
            break;
        case ON_ERROR:
            UiError e = (UiError)msg.obj;
            Toast.makeText(mContext, "errorMsg:" + e.errorMessage
                    + "errorDetail:" + e.errorDetail, Toast.LENGTH_SHORT).show();
            break;
        case ON_CANCEL:
            Toast.makeText(mContext, "onCancel", Toast.LENGTH_SHORT).show();
            break;
    }
}
 
开发者ID:x251089003,项目名称:EveryXDay,代码行数:18,代码来源:BaseUiListener.java

示例8: a

import com.tencent.tauth.UiError; //导入依赖的package包/类
private void a(Context context, Bundle bundle, IUiListener iuilistener)
{
    Object obj = TemporaryStorage.set("shareToQzone", iuilistener);
    if (obj != null)
    {
        ((IUiListener)obj).onCancel();
    }
    com.tencent.a.a.c.a("openSDK_LOG", "shareToH5Qzone() --start");
    StringBuffer stringbuffer = new StringBuffer("http://openmobile.qq.com/api/check2?page=qzshare.html&loginpage=loginindex.html&logintype=qzone");
    if (bundle == null)
    {
        bundle = new Bundle();
    }
    StringBuffer stringbuffer1 = a(stringbuffer, bundle);
    com.tencent.connect.a.a.a(mContext, mToken, "requireApi", new String[] {
        "shareToH5QQ"
    });
    if (!Util.openBrowser(context, stringbuffer1.toString()) && iuilistener != null)
    {
        iuilistener.onError(new UiError(-6, "\u6253\u5F00\u6D4F\u89C8\u5668\u5931\u8D25!", null));
    }
    com.tencent.a.a.c.a("openSDK_LOG", "shareToH5QQ() --end");
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:24,代码来源:QzoneShare.java

示例9: c

import com.tencent.tauth.UiError; //导入依赖的package包/类
private void c(Activity activity, Bundle bundle, IUiListener iuilistener)
{
    Object obj = TemporaryStorage.set("shareToQQ", iuilistener);
    if (obj != null)
    {
        ((IUiListener)obj).onCancel();
    }
    com.tencent.a.a.c.a("openSDK_LOG", "shareToH5QQ() --start");
    StringBuffer stringbuffer = new StringBuffer("http://openmobile.qq.com/api/check?page=shareindex.html&style=9");
    if (bundle == null)
    {
        bundle = new Bundle();
    }
    StringBuffer stringbuffer1 = a(stringbuffer, bundle);
    com.tencent.connect.a.a.a(mContext, mToken, "requireApi", new String[] {
        "shareToH5QQ"
    });
    if (!Util.openBrowser(activity, stringbuffer1.toString()) && iuilistener != null)
    {
        iuilistener.onError(new UiError(-6, "\u6253\u5F00\u6D4F\u89C8\u5668\u5931\u8D25!", null));
    }
    com.tencent.a.a.c.a("openSDK_LOG", "shareToH5QQ() --end");
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:24,代码来源:QQShare.java

示例10: onError

import com.tencent.tauth.UiError; //导入依赖的package包/类
public void onError(UiError uierror)
{
    String s;
    if (uierror.errorMessage != null)
    {
        s = (new StringBuilder()).append(uierror.errorMessage).append(a).toString();
    } else
    {
        s = a;
    }
    com.tencent.open.a.b.a().a((Context)AuthDialog.a().get(), (new StringBuilder()).append(d).append("_H5").toString(), SystemClock.elapsedRealtime(), 0L, 0L, uierror.errorCode, b, s, "1000067");
    if (e != null)
    {
        e.onError(uierror);
        e = null;
    }
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:18,代码来源:m.java

示例11: a

import com.tencent.tauth.UiError; //导入依赖的package包/类
protected void a(Exception exception)
{
    if (exception != null)
    {
        exception.printStackTrace();
    }
    if (exception == null)
    {
        JSONObject jsonobject = new JSONObject();
        try
        {
            jsonobject.put("result", "\u6682\u65E0\u4EFB\u52A1");
        }
        catch (JSONException jsonexception)
        {
            jsonexception.printStackTrace();
        }
        a.c.onComplete(jsonobject);
    } else
    {
        a.c.onError(new UiError(100, "error ", "\u83B7\u53D6\u4EFB\u52A1\u5931\u8D25"));
    }
    TaskGuide.x(a).post(new y(this));
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:25,代码来源:x.java

示例12: onError

import com.tencent.tauth.UiError; //导入依赖的package包/类
public void onError(UiError uierror)
{
    String s;
    if (uierror.errorMessage != null)
    {
        s = (new StringBuilder()).append(uierror.errorMessage).append(a).toString();
    } else
    {
        s = a;
    }
    com.tencent.open.a.b.a().a((Context)c.get(), (new StringBuilder()).append(d).append("_H5").toString(), SystemClock.elapsedRealtime(), 0L, 0L, uierror.errorCode, b, s, "1000067");
    if (e != null)
    {
        e.onError(uierror);
        e = null;
    }
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:18,代码来源:o.java

示例13: onComplete

import com.tencent.tauth.UiError; //导入依赖的package包/类
public void onComplete(Object obj)
{
    JSONObject jsonobject = (JSONObject)obj;
    if (jsonobject.getInt("ret") == 0)
    {
        a.onComplete("");
        return;
    }
    try
    {
        a.onError(new UiError(-4, jsonobject.toString(), null));
        return;
    }
    catch (JSONException jsonexception)
    {
        a.onError(new UiError(-4, jsonexception.getMessage(), null));
    }
    return;
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:20,代码来源:k.java

示例14: onComplete

import com.tencent.tauth.UiError; //导入依赖的package包/类
public void onComplete(Object obj)
{
    JSONObject jsonobject = (JSONObject)obj;
    if (jsonobject.getInt("ret") == 0)
    {
        String s = jsonobject.getJSONObject("data").getString("value");
        a.onComplete(Util.hexToString(s));
        return;
    }
    try
    {
        a.onError(new UiError(-4, jsonobject.toString(), null));
        return;
    }
    catch (JSONException jsonexception)
    {
        a.onError(new UiError(-4, jsonexception.getMessage(), null));
    }
    return;
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:21,代码来源:l.java

示例15: onComplete

import com.tencent.tauth.UiError; //导入依赖的package包/类
public void onComplete(Object obj)
{
    JSONObject jsonobject = (JSONObject)obj;
    if (jsonobject.getInt("ret") == 0)
    {
        a.onComplete(Boolean.TRUE);
        return;
    }
    try
    {
        a.onComplete(Boolean.FALSE);
        return;
    }
    catch (JSONException jsonexception)
    {
        a.onError(new UiError(-4, jsonexception.getMessage(), null));
    }
    return;
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:20,代码来源:o.java


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