diff --git a/app/build.gradle b/app/build.gradle index 955a683..0580e06 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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 diff --git a/app/libs/TDSCommon_1.1.3.aar b/app/libs/TDSCommon_1.1.3.aar deleted file mode 100644 index 9302a9e..0000000 Binary files a/app/libs/TDSCommon_1.1.3.aar and /dev/null differ diff --git a/app/libs/TDSCommon_1.1.4.aar b/app/libs/TDSCommon_1.1.4.aar new file mode 100644 index 0000000..10560ff Binary files /dev/null and b/app/libs/TDSCommon_1.1.4.aar differ diff --git a/app/libs/TapSDK_0.0.21.aar b/app/libs/TapSDK_v1.0.0.aar similarity index 88% rename from app/libs/TapSDK_0.0.21.aar rename to app/libs/TapSDK_v1.0.0.aar index 2f28eb1..3623612 100644 Binary files a/app/libs/TapSDK_0.0.21.aar and b/app/libs/TapSDK_v1.0.0.aar differ diff --git a/app/src/main/java/com/tds/demo/MainActivity.java b/app/src/main/java/com/tds/demo/MainActivity.java index 53a089a..3790e3a 100644 --- a/app/src/main/java/com/tds/demo/MainActivity.java +++ b/app/src/main/java/com/tds/demo/MainActivity.java @@ -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()); @@ -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(); } }