Java Code Examples for com.tencent.tauth.Tencent#onActivityResultData()

The following examples show how to use com.tencent.tauth.Tencent#onActivityResultData() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LoginActivity.java    From Social with Apache License 2.0 6 votes vote down vote up
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (requestCode == Constants.REQUEST_LOGIN ||
            requestCode == Constants.REQUEST_APPBAR) {
        Tencent.onActivityResultData(requestCode, resultCode, data, loginListener);
    }
    if (requestCode==REQUEST_CODE_SET_ACCOUNT && resultCode==RESULT_OK){
        //登录
        loginWithQQopenid();
    }

    if (requestCode == REQUEST_CODE_REGIST && resultCode ==RESULT_OK){
        SocialMainActivity.startSelf(this);
        finish();
    }

    super.onActivityResult(requestCode, resultCode, data);
}
 
Example 2
Source File: ShareHandlerActivity.java    From ShareSDK with MIT License 5 votes vote down vote up
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (requestCode == Constants.REQUEST_QQ_SHARE || requestCode == Constants.REQUEST_QZONE_SHARE) {
        Tencent.onActivityResultData(requestCode, resultCode, data, null);
    }
}
 
Example 3
Source File: QQHelper.java    From android-common-utils with Apache License 2.0 5 votes vote down vote up
public void onActivityResultByLogin(Activity activity,int requestCode, int resultCode, Intent data){
    Tencent.onActivityResultData(requestCode,resultCode,data,mLoginListener);
    if(requestCode == Constants.REQUEST_API) {
        if(resultCode == Constants.RESULT_LOGIN) {
            Tencent.handleResultData(data, mLoginListener);
            Log.i(TAG, "-->onActivityResult handle logindata");
        }
    }
}
 
Example 4
Source File: LoginActivity.java    From MyHearts with Apache License 2.0 5 votes vote down vote up
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    Log.d("ruolan", "-->onActivityResult " + requestCode + " resultCode=" + resultCode);
    if (requestCode == Constants.REQUEST_LOGIN ||
            requestCode == Constants.REQUEST_APPBAR) {
        Tencent.onActivityResultData(requestCode, resultCode, data, loginListener);
    }

    super.onActivityResult(requestCode, resultCode, data);
}
 
Example 5
Source File: MainActivity.java    From fangzhuishushenqi with Apache License 2.0 5 votes vote down vote up
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (requestCode == Constants.REQUEST_LOGIN || requestCode == Constants.REQUEST_APPBAR) {
        Tencent.onActivityResultData(requestCode, resultCode, data, loginListener);
    }
    super.onActivityResult(requestCode, resultCode, data);
}
 
Example 6
Source File: QQHelper.java    From SocialHelper with Apache License 2.0 5 votes vote down vote up
/**
 * 2、被调用,回调到{@link #loginListener},然后调用{@link #loginListener}的onComplete方法
 */
void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (loginListener != null) {
        Tencent.onActivityResultData(requestCode, resultCode, data, loginListener);
    }
    if (shareListener != null) {
        Tencent.onActivityResultData(requestCode, resultCode, data, shareListener);
    }
}
 
Example 7
Source File: LogOnActivity.java    From nono-android with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
   // Log.d(TAG, "-->onActivityResult " + requestCode  + " resultCode=" + resultCode);
    if (requestCode == Constants.REQUEST_LOGIN ||
            requestCode == Constants.REQUEST_APPBAR) {
        Util.showProgressDialog(LogOnActivity.this,"正在登陆","登陆中...");
        Tencent.onActivityResultData(requestCode,resultCode,data,loginListener);
    }
    super.onActivityResult(requestCode, resultCode, data);
}
 
Example 8
Source File: QQChatShareHandler.java    From BiliShare with Apache License 2.0 5 votes vote down vote up
@Override
public void onActivityResult(Activity activity, int requestCode, int resultCode, Intent data, SocializeListeners.ShareListener listener) {
    super.onActivityResult(activity, requestCode, resultCode, data, listener);
    if (requestCode == Constants.REQUEST_QQ_SHARE) {
        Log.d(TAG, "handle on activity result");
        Tencent.onActivityResultData(requestCode, resultCode, data, mUiListener);
    }
}
 
Example 9
Source File: LoginSDKHelper.java    From HaiNaBaiChuan with Apache License 2.0 5 votes vote down vote up
public void onActivityResult(int requestCode, int resultCode, Intent data) {
        if (requestCode == Constants.REQUEST_LOGIN ||
                requestCode == Constants.REQUEST_APPBAR) {
            Tencent.onActivityResultData(requestCode, resultCode, data, qqIUiListener);
        }

//        if (callbackManager != null) {
//            callbackManager.onActivityResult(requestCode, resultCode, data);
//        }
    }
 
Example 10
Source File: GosUserLoginActivity.java    From gokit-android with MIT License 4 votes vote down vote up
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
	Tencent.onActivityResultData(requestCode, resultCode, data, listener);
}
 
Example 11
Source File: QQShareInstance.java    From ShareLoginPayUtil with Apache License 2.0 4 votes vote down vote up
@Override
public void handleResult(int requestCode, int resultCode, Intent data) {
    Tencent.onActivityResultData(requestCode, resultCode, data, ShareUtil.mShareListener);
}
 
Example 12
Source File: Share.java    From UPMiss with GNU General Public License v3.0 4 votes vote down vote up
public static void onActivityResult(Context context, int requestCode, int resultCode, Intent data) {
    if (requestCode == com.tencent.connect.common.Constants.REQUEST_QQ_SHARE) {
        Tencent.onActivityResultData(requestCode, resultCode, data, getQQShareListener(context));
    }
}
 
Example 13
Source File: QQHandler.java    From SocialSDKAndroid with Apache License 2.0 4 votes vote down vote up
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    Tencent.onActivityResultData(requestCode, resultCode, data, null);
}
 
Example 14
Source File: GosUserLoginActivity.java    From Gizwits-SmartBuld_Android with MIT License 4 votes vote down vote up
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
	Tencent.onActivityResultData(requestCode, resultCode, data, listener);
}
 
Example 15
Source File: TXShare.java    From sdk3rd with Apache License 2.0 4 votes vote down vote up
@Override
public void onResult(int requestCode, int resultCode, Intent data) {
    if (requestCode == Constants.REQUEST_QQ_SHARE || requestCode == Constants.REQUEST_QZONE_SHARE) {
        Tencent.onActivityResultData(requestCode, resultCode, data, mListener);
    }
}
 
Example 16
Source File: LoginActivity.java    From PocketEOS-Android with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    hideProgress();
    Tencent.onActivityResultData(requestCode, resultCode, data, new BaseUIListener());
}
 
Example 17
Source File: OtherLoginTypeActivity.java    From PocketEOS-Android with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    hideProgress();
    Tencent.onActivityResultData(requestCode, resultCode, data, new BaseUIListener());
}
 
Example 18
Source File: QQBaseShareInstance.java    From SimpleProject with MIT License 4 votes vote down vote up
@Override
public void handleResult(int requestCode, int resultCode, Intent intent) {
	Tencent.onActivityResultData(requestCode, resultCode, intent, this);
}
 
Example 19
Source File: SocialShareProxy.java    From ESSocialSDK with Apache License 2.0 2 votes vote down vote up
/**
 * 分享到QQ,QQ空间结果回调
 *
 * @param requestCode request
 * @param resultCode  result
 * @param data        data
 */
public static void shareToQCallback(int requestCode, int resultCode, Intent data) {
    Tencent.onActivityResultData(requestCode, resultCode, data, qShareListener);
}
 
Example 20
Source File: SocialSSOProxy.java    From ESSocialSDK with Apache License 2.0 2 votes vote down vote up
/**
 * QQ登录状态回调
 *
 * @param requestCode request
 * @param resultCode  result
 * @param data        data
 */
public static void loginQQCallback(int requestCode, int resultCode, Intent data) {
    Tencent.onActivityResultData(requestCode, resultCode, data, qqLoginListener);
}