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

The following examples show how to use com.tencent.tauth.Tencent#handleResultData() . 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: CoinDetailsActivity.java    From PocketEOS-Android with GNU Lesser General Public License v3.0 6 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(CoinDetailsActivity.this, true));
        if (requestCode == Constants.REQUEST_QQ_SHARE || requestCode == Constants.REQUEST_QZONE_SHARE || requestCode == Constants.REQUEST_OLD_SHARE) {
            Tencent.handleResultData(data, new BaseUIListener(CoinDetailsActivity.this, true));
        }
        if (requestCode == 100 && resultCode == 300) {
            if (data.getExtras().getString("coin_type").equals(accountWithCoinBean.getCoinName())) {
                mDataBeanList.clear();
                page = 0;
                mPostChainHistoryBean.setPage(page);
                presenter.getTransferHistoryData(mPostChainHistoryBean);
                BigDecimal oldcoinforcny = new BigDecimal(accountWithCoinBean.getCoinForCny());
                BigDecimal oldcoin = new BigDecimal(accountWithCoinBean.getCoinNumber());
                BigDecimal minuscny = new BigDecimal(data.getExtras().getString("coin_cny"));
                BigDecimal minuscoin = new BigDecimal(data.getExtras().getString("coin_number"));
                mIconTotalNumber.setText(StringUtils.addComma(BigDecimalUtil.minus(oldcoinforcny, minuscny, 4) + "") + " CNY");
                mIconNumber.setText(StringUtils.addComma(BigDecimalUtil.minus(oldcoin, minuscoin, 4) + "") + " " + accountWithCoinBean.getCoinName());
                mIconRmbNumber.setText("≈" + StringUtils.addComma(BigDecimalUtil.minus(oldcoinforcny, minuscny, 4) + "") + " CNY");
            }
        }
    }
 
Example 2
Source File: BlackBoxCoinDetailsActivity.java    From PocketEOS-Android with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    hideProgress();
    if (requestCode == Constants.REQUEST_QQ_SHARE || requestCode == Constants.REQUEST_QZONE_SHARE || requestCode == Constants.REQUEST_OLD_SHARE) {
        Tencent.handleResultData(data, new BaseUIListener(BlackBoxCoinDetailsActivity.this, true));
    }
    if (requestCode == 100 && resultCode == 300) {
        if (data.getExtras().getString("coin_type").equals(accountWithCoinBean.getCoinName())) {
            mDataBeanList.clear();
            page = 0;
            mPostChainHistoryBean.setPage(0);
            presenter.getTransferHistoryData(mPostChainHistoryBean);
        }
    }
}
 
Example 3
Source File: QQHelper.java    From android-common-utils with Apache License 2.0 6 votes vote down vote up
public void onActivityResultByShare(Activity activity,int requestCode, int resultCode, Intent data){
    Tencent.onActivityResultData(requestCode, resultCode, data, mShareListener);
    if (requestCode == Constants.REQUEST_QQ_SHARE) {
        if (resultCode == Constants.ACTIVITY_OK) {
            Tencent.handleResultData(data, mShareListener);
        }
    }else{
        String path = null;
        if (resultCode == Activity.RESULT_OK && requestCode == 0) {
            if (data != null && data.getData() != null) {
                // 根据返回的URI获取对应的SQLite信息
                Uri uri = data.getData();
                path = QQUtil.getPath(activity, uri);
            }
        }
        Log.d(TAG," user selected path =  " + path );
        //path may be null;
    }
}
 
Example 4
Source File: ContinueRdPacketActivity.java    From PocketEOS-Android with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    hideProgress();
    if (requestCode == Constants.REQUEST_QQ_SHARE || requestCode == Constants.REQUEST_QZONE_SHARE || requestCode == Constants.REQUEST_OLD_SHARE) {
        Tencent.handleResultData(data, new BaseUIListener(ContinueRdPacketActivity.this, true));
    }
}
 
Example 5
Source File: AnticipationRedPacketActivity.java    From PocketEOS-Android with GNU Lesser General Public License v3.0 5 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(AnticipationRedPacketActivity.this, true));
        if (requestCode == Constants.REQUEST_API) {
            if (resultCode == Constants.REQUEST_QQ_SHARE || resultCode == Constants.REQUEST_QZONE_SHARE || resultCode == Constants.REQUEST_OLD_SHARE) {
                Tencent.handleResultData(data, new BaseUIListener(AnticipationRedPacketActivity.this, true));
            }
        }
    }
 
Example 6
Source File: MakeCollectionsActivity.java    From PocketEOS-Android with GNU Lesser General Public License v3.0 5 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(MakeCollectionsActivity.this, true));
        if (requestCode == Constants.REQUEST_QQ_SHARE || requestCode == Constants.REQUEST_QZONE_SHARE || requestCode == Constants.REQUEST_OLD_SHARE) {
            Tencent.handleResultData(data, new BaseUIListener(MakeCollectionsActivity.this, true));
        }
    }
 
Example 7
Source File: MainActivity.java    From PocketEOS-Android with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    Fragment fragment = homeFragment;
    fragment.onActivityResult(requestCode, resultCode, data);
    hideProgress();
    if (requestCode == Constants.REQUEST_QQ_SHARE || requestCode == Constants.REQUEST_QZONE_SHARE || requestCode == Constants.REQUEST_OLD_SHARE) {
        Tencent.handleResultData(data, new BaseUIListener(MainActivity.this, true));
    }
}
 
Example 8
Source File: AccountDetailsActivity.java    From PocketEOS-Android with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    hideProgress();
    if (requestCode == Constants.REQUEST_QQ_SHARE || requestCode == Constants.REQUEST_QZONE_SHARE || requestCode == Constants.REQUEST_OLD_SHARE) {
        Tencent.handleResultData(data, new BaseUIListener(AccountDetailsActivity.this, true));
    }
}
 
Example 9
Source File: QQPlatform.java    From SocialSdkLibrary with Apache License 2.0 5 votes vote down vote up
@Override
public void onActivityResult(BaseActionActivity activity, int requestCode, int resultCode, Intent data) {
    if (requestCode == Constants.REQUEST_QQ_SHARE || requestCode == Constants.REQUEST_QZONE_SHARE) {
        if (mIUiListenerWrap != null)
            Tencent.handleResultData(data, mIUiListenerWrap);
    } else if (requestCode == Constants.REQUEST_LOGIN) {
        if (mQQLoginHelper != null)
            mQQLoginHelper.handleResultData(data);
    }
}
 
Example 10
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 11
Source File: QQLoginInstance.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.handleResultData(data, mIUiListener);
}
 
Example 12
Source File: QQLoginHelper.java    From SocialSdkLibrary with Apache License 2.0 4 votes vote down vote up
void handleResultData(Intent data) {
    Tencent.handleResultData(data, this.mUiListener);
}
 
Example 13
Source File: QQShareInstance.java    From ShareUtil with Apache License 2.0 4 votes vote down vote up
@Override
public void handleResult(Intent data) {
    Tencent.handleResultData(data, ShareUtil.mShareListener);
}
 
Example 14
Source File: QQLoginInstance.java    From ShareUtil with Apache License 2.0 4 votes vote down vote up
@Override
public void handleResult(int requestCode, int resultCode, Intent data) {
    Tencent.handleResultData(data, mIUiListener);
}
 
Example 15
Source File: QQShareInstance.java    From smart-farmer-android with Apache License 2.0 4 votes vote down vote up
@Override
public void handleResult(Intent data) {
    Tencent.handleResultData(data, ShareUtil.mShareListener);
}
 
Example 16
Source File: QQLoginInstance.java    From smart-farmer-android with Apache License 2.0 4 votes vote down vote up
@Override
public void handleResult(int requestCode, int resultCode, Intent data) {
    Tencent.handleResultData(data, mIUiListener);
}