當前位置: 首頁>>代碼示例>>Java>>正文


Java BaseApi類代碼示例

本文整理匯總了Java中com.tencent.connect.common.BaseApi的典型用法代碼示例。如果您正苦於以下問題:Java BaseApi類的具體用法?Java BaseApi怎麽用?Java BaseApi使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


BaseApi類屬於com.tencent.connect.common包,在下文中一共展示了BaseApi類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: a

import com.tencent.connect.common.BaseApi; //導入依賴的package包/類
private int a(Activity activity, Fragment fragment, String str, IUiListener iUiListener, String str2) {
    String str3;
    String packageName = activity.getApplicationContext().getPackageName();
    for (ApplicationInfo applicationInfo : activity.getPackageManager().getInstalledApplications(128)) {
        if (packageName.equals(applicationInfo.packageName)) {
            str3 = applicationInfo.sourceDir;
            break;
        }
    }
    str3 = null;
    if (str3 != null) {
        try {
            String readChannelId = ApkExternalInfoTool.readChannelId(new File(str3));
            if (!TextUtils.isEmpty(readChannelId)) {
                f.b(f.d, "-->login channelId: " + readChannelId);
                return loginWithOEM(activity, str, iUiListener, readChannelId, readChannelId, "");
            }
        } catch (IOException e) {
            f.b(f.d, "-->login get channel id exception." + e.getMessage());
            e.printStackTrace();
        }
    }
    f.b(f.d, "-->login channelId is null ");
    BaseApi.isOEM = false;
    return this.a.doLogin(activity, str, iUiListener, false, fragment);
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:27,代碼來源:QQAuth.java

示例2: loginWithOEM

import com.tencent.connect.common.BaseApi; //導入依賴的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

示例3: loginWithOEM

import com.tencent.connect.common.BaseApi; //導入依賴的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,項目名稱:boohee_v5.6,代碼行數:20,代碼來源:QQAuth.java

示例4: loginWithOEM

import com.tencent.connect.common.BaseApi; //導入依賴的package包/類
public int loginWithOEM(Activity activity, String s, IUiListener iuilistener, String s1, String s2, String s3)
{
    com.tencent.a.a.c.b("openSDK_LOG", "loginWithOEM");
    BaseApi.isOEM = true;
    if (s1.equals(""))
    {
        s1 = "null";
    }
    if (s2.equals(""))
    {
        s2 = "null";
    }
    if (s3.equals(""))
    {
        s3 = "null";
    }
    BaseApi.installChannel = s2;
    BaseApi.registerChannel = s1;
    BaseApi.businessId = s3;
    return a.doLogin(activity, s, iuilistener);
}
 
開發者ID:vishnudevk,項目名稱:MiBandDecompiled,代碼行數:22,代碼來源:QQAuth.java

示例5: onActivityResult

import com.tencent.connect.common.BaseApi; //導入依賴的package包/類
public void onActivityResult(Activity activity, int i, int i2, Intent intent) {
    IUiListener iUiListener;
    ThreadManager.executeOnSubThread(new Runnable(this) {
        final /* synthetic */ AuthAgent a;

        {
            this.a = r1;
        }

        public void run() {
            Global.saveVersionCode();
        }
    });
    for (ApiTask apiTask : this.mTaskList) {
        if (apiTask.mRequestCode == i) {
            IUiListener iUiListener2 = apiTask.mListener;
            this.mTaskList.remove(apiTask);
            iUiListener = iUiListener2;
            break;
        }
    }
    iUiListener = null;
    if (intent != null) {
        a(intent.getStringExtra(com.tencent.connect.common.Constants.KEY_RESPONSE));
        if (iUiListener == null) {
            AssistActivity.setResultDataForLogin(activity, intent);
            return;
        }
        if (i2 == -1) {
            BaseApi.handleDataToListener(intent, iUiListener);
        } else {
            f.b(f.d, "OpenUi, onActivityResult, Constants.ACTIVITY_CANCEL");
            iUiListener.onCancel();
        }
        releaseResource();
        f.b();
    } else if (iUiListener != null) {
        iUiListener.onCancel();
    }
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:41,代碼來源:AuthAgent.java

示例6: onActivityResult

import com.tencent.connect.common.BaseApi; //導入依賴的package包/類
public void onActivityResult(Activity activity, int i, int i2, Intent intent) {
    IUiListener iUiListener;
    ThreadManager.executeOnSubThread(new Runnable(this) {
        final /* synthetic */ AuthAgent a;

        {
            this.a = r1;
        }

        public void run() {
            Global.saveVersionCode();
        }
    });
    for (ApiTask apiTask : this.mTaskList) {
        if (apiTask.mRequestCode == i) {
            IUiListener iUiListener2 = apiTask.mListener;
            this.mTaskList.remove(apiTask);
            iUiListener = iUiListener2;
            break;
        }
    }
    iUiListener = null;
    if (intent != null) {
        a(intent.getStringExtra(Constants.KEY_RESPONSE));
        if (iUiListener == null) {
            AssistActivity.setResultDataForLogin(activity, intent);
            return;
        }
        if (i2 == -1) {
            BaseApi.handleDataToListener(intent, iUiListener);
        } else {
            f.b(f.d, "OpenUi, onActivityResult, Constants.ACTIVITY_CANCEL");
            iUiListener.onCancel();
        }
        releaseResource();
        f.b();
    } else if (iUiListener != null) {
        iUiListener.onCancel();
    }
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:41,代碼來源:AuthAgent.java

示例7: a

import com.tencent.connect.common.BaseApi; //導入依賴的package包/類
private int a(Activity activity, Fragment fragment, String str, IUiListener iUiListener,
              String str2) {
    String str3;
    String packageName = activity.getApplicationContext().getPackageName();
    for (ApplicationInfo applicationInfo : activity.getPackageManager()
            .getInstalledApplications(128)) {
        if (packageName.equals(applicationInfo.packageName)) {
            str3 = applicationInfo.sourceDir;
            break;
        }
    }
    str3 = null;
    if (str3 != null) {
        try {
            String readChannelId = ApkExternalInfoTool.readChannelId(new File(str3));
            if (!TextUtils.isEmpty(readChannelId)) {
                f.b(f.d, "-->login channelId: " + readChannelId);
                return loginWithOEM(activity, str, iUiListener, readChannelId, readChannelId,
                        "");
            }
        } catch (IOException e) {
            f.b(f.d, "-->login get channel id exception." + e.getMessage());
            e.printStackTrace();
        }
    }
    f.b(f.d, "-->login channelId is null ");
    BaseApi.isOEM = false;
    return this.a.doLogin(activity, str, iUiListener, false, fragment);
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:30,代碼來源:QQAuth.java

示例8: addAlbum

import com.tencent.connect.common.BaseApi; //導入依賴的package包/類
public void addAlbum(String s, String s1, AlbumSecurity albumsecurity, String s2, String s3, IUiListener iuilistener)
{
    Bundle bundle = composeCGIParams();
    if (s == null)
    {
        s = "";
    }
    bundle.putString("albumname", s);
    if (s1 == null)
    {
        s1 = "";
    }
    bundle.putString("albumdesc", s1);
    String s4;
    com.tencent.connect.common.BaseApi.TempRequestListener temprequestlistener;
    if (albumsecurity == null)
    {
        s4 = AlbumSecurity.publicToAll.getSecurity();
    } else
    {
        s4 = albumsecurity.getSecurity();
    }
    bundle.putString("priv", s4);
    if (s2 == null)
    {
        s2 = "";
    }
    bundle.putString("question", s2);
    if (s3 == null)
    {
        s3 = "";
    }
    bundle.putString("answer", s3);
    temprequestlistener = new com.tencent.connect.common.BaseApi.TempRequestListener(this, iuilistener);
    HttpUtils.requestAsync(mToken, mContext, "photo/add_album", bundle, "POST", temprequestlistener);
}
 
開發者ID:vishnudevk,項目名稱:MiBandDecompiled,代碼行數:37,代碼來源:Albums.java

示例9: listPhotos

import com.tencent.connect.common.BaseApi; //導入依賴的package包/類
public void listPhotos(String s, IUiListener iuilistener)
{
    Bundle bundle = composeCGIParams();
    if (s == null)
    {
        s = "";
    }
    bundle.putString("albumid", s);
    com.tencent.connect.common.BaseApi.TempRequestListener temprequestlistener = new com.tencent.connect.common.BaseApi.TempRequestListener(this, iuilistener);
    HttpUtils.requestAsync(mToken, mContext, "photo/list_photo", bundle, "GET", temprequestlistener);
}
 
開發者ID:vishnudevk,項目名稱:MiBandDecompiled,代碼行數:12,代碼來源:Albums.java

示例10: getTenPayAddr

import com.tencent.connect.common.BaseApi; //導入依賴的package包/類
public void getTenPayAddr(IUiListener iuilistener)
{
    Bundle bundle = composeCGIParams();
    bundle.putString("ver", "1");
    com.tencent.connect.common.BaseApi.TempRequestListener temprequestlistener = new com.tencent.connect.common.BaseApi.TempRequestListener(this, iuilistener);
    HttpUtils.requestAsync(mToken, mContext, "cft_info/get_tenpay_addr", bundle, "GET", temprequestlistener);
}
 
開發者ID:vishnudevk,項目名稱:MiBandDecompiled,代碼行數:8,代碼來源:UserInfo.java

示例11: a

import com.tencent.connect.common.BaseApi; //導入依賴的package包/類
public void a(Bitmap bitmap, IUiListener iuilistener)
{
    Bundle bundle = composeCGIParams();
    ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream();
    bitmap.compress(android.graphics.Bitmap.CompressFormat.JPEG, 40, bytearrayoutputstream);
    byte abyte0[] = bytearrayoutputstream.toByteArray();
    bitmap.recycle();
    com.tencent.connect.common.BaseApi.TempRequestListener temprequestlistener = new com.tencent.connect.common.BaseApi.TempRequestListener(this, iuilistener);
    bundle.putByteArray("picture", abyte0);
    HttpUtils.requestAsync(mToken, mContext, "user/set_user_face", bundle, "POST", temprequestlistener);
}
 
開發者ID:vishnudevk,項目名稱:MiBandDecompiled,代碼行數:12,代碼來源:e.java

示例12: atFriends

import com.tencent.connect.common.BaseApi; //導入依賴的package包/類
public void atFriends(int i, IUiListener iuilistener)
{
    Bundle bundle = composeCGIParams();
    bundle.putString("reqnum", (new StringBuilder()).append(i).append("").toString());
    com.tencent.connect.common.BaseApi.TempRequestListener temprequestlistener = new com.tencent.connect.common.BaseApi.TempRequestListener(this, iuilistener);
    HttpUtils.requestAsync(mToken, mContext, "friends/get_intimate_friends_weibo", bundle, "GET", temprequestlistener);
}
 
開發者ID:vishnudevk,項目名稱:MiBandDecompiled,代碼行數:8,代碼來源:Weibo.java

示例13: deleteText

import com.tencent.connect.common.BaseApi; //導入依賴的package包/類
public void deleteText(String s, IUiListener iuilistener)
{
    Bundle bundle = composeCGIParams();
    bundle.putString("id", s);
    com.tencent.connect.common.BaseApi.TempRequestListener temprequestlistener = new com.tencent.connect.common.BaseApi.TempRequestListener(this, iuilistener);
    HttpUtils.requestAsync(mToken, mContext, "t/del_t", bundle, "POST", temprequestlistener);
}
 
開發者ID:vishnudevk,項目名稱:MiBandDecompiled,代碼行數:8,代碼來源:Weibo.java

示例14: nickTips

import com.tencent.connect.common.BaseApi; //導入依賴的package包/類
public void nickTips(String s, int i, IUiListener iuilistener)
{
    Bundle bundle = composeCGIParams();
    if (s == null)
    {
        s = "";
    }
    bundle.putString("match", s);
    bundle.putString("reqnum", (new StringBuilder()).append(i).append("").toString());
    com.tencent.connect.common.BaseApi.TempRequestListener temprequestlistener = new com.tencent.connect.common.BaseApi.TempRequestListener(this, iuilistener);
    HttpUtils.requestAsync(mToken, mContext, "friends/match_nick_tips_weibo", bundle, "GET", temprequestlistener);
}
 
開發者ID:vishnudevk,項目名稱:MiBandDecompiled,代碼行數:13,代碼來源:Weibo.java

示例15: sendText

import com.tencent.connect.common.BaseApi; //導入依賴的package包/類
public void sendText(String s, IUiListener iuilistener)
{
    Bundle bundle = composeCGIParams();
    if (s == null)
    {
        s = "";
    }
    bundle.putString("content", s);
    com.tencent.connect.common.BaseApi.TempRequestListener temprequestlistener = new com.tencent.connect.common.BaseApi.TempRequestListener(this, iuilistener);
    HttpUtils.requestAsync(mToken, mContext, "t/add_t", bundle, "POST", temprequestlistener);
}
 
開發者ID:vishnudevk,項目名稱:MiBandDecompiled,代碼行數:12,代碼來源:Weibo.java


注:本文中的com.tencent.connect.common.BaseApi類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。