Skip to content

Commit

Permalink
Merge pull request #1 from JemyCheung/master
Browse files Browse the repository at this point in the history
release 1.0.0
  • Loading branch information
JemyCheung authored Jan 18, 2021
2 parents 3edccfb + 80f2516 commit e855ed8
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 18 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

// TAP SDK BEGIN
implementation(name:'TapSDK_0.0.21', ext:'aar')
implementation(name:'TDSCommon_1.1.3', ext:'aar')
implementation(name:'TapSDK_v1.0.0', ext:'aar')
implementation(name:'TDSCommon_1.1.4', ext:'aar')
implementation(name:'oaid_sdk_1.0.23', ext:'aar')
// TAP SDK END

Expand Down
Binary file removed app/libs/TDSCommon_1.1.3.aar
Binary file not shown.
Binary file added app/libs/TDSCommon_1.1.4.aar
Binary file not shown.
Binary file not shown.
31 changes: 15 additions & 16 deletions app/src/main/java/com/tds/demo/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ protected void onCreate(Bundle savedInstanceState) {

//初始化SDK
com.tds.TdsConfig.Builder configBuilder = new com.tds.TdsConfig.Builder()
.appContext(getApplicationContext())
.clientId("FwFdCIr6u71WQDQwQN");
.appContext(getApplicationContext())
.clientId("FwFdCIr6u71WQDQwQN");

TdsInitializer.init(configBuilder.build());

Expand Down Expand Up @@ -115,27 +115,26 @@ public void onLoginError(com.taptap.sdk.AccountGlobalError accountGlobalError) {
// 登录过程中出现异常
if (null != accountGlobalError) {
// 执行 TapTap Token 失效后的相关处理操作
if (AccountGlobalError.LOGIN_ERROR_ACCESS_DENIED.equals(accountGlobalError.getError())
|| AccountGlobalError.LOGIN_ERROR_FORBIDDEN.equals(accountGlobalError.getError())) {
if (AccountGlobalError.LOGIN_ERROR_ACCESS_DENIED.equals(accountGlobalError.getError())) {
if (null != alertDialog && alertDialog.isShowing()) {
return;
}
alertDialog = new AlertDialog.Builder(MainActivity.this)
.setTitle("错误")
.setMessage("当前用户已失效, 请重新登录!")
.setNegativeButton(
"取消", new OnClickListener() {
.setTitle("错误")
.setMessage("当前用户已失效, 请重新登录!")
.setNegativeButton(
"取消", new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {

}
})
.setPositiveButton("重新登录", new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {

TapLoginHelper.startTapLogin(MainActivity.this, TapLoginHelper.SCOPE_PUBLIC_PROFILE);
}
})
.setPositiveButton("重新登录", new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
TapLoginHelper.startTapLogin(MainActivity.this, TapLoginHelper.SCOPE_PUBLIC_PROFILE);
}
}).create();
}).create();
alertDialog.show();
}
}
Expand Down

0 comments on commit e855ed8

Please sign in to comment.