本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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();
}
}
示例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();
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}