This section details the changes that were necessary to upgrade Tutorial App from the version 7.0.2 of the Android App SDK to version 8.0.1. Use this as a reference for updates that you may need to make in your apps.
Configuration changes
Replace the m2repository folder from the extracted 7.0.2 package with the same folder from the 8.0.1 package.
In the app level build.gradle file, replace all 7.0.2.x versions with 8.0.1.x
Set the version number in the AppSDK/android-studio/app_tutorial_plus/app/src/main/res/raw/config.json file to "8.0.1" to match the SDK version.
Code changes
TutorialAppPlus.java
Line 30: Remove import com.noknok.android.tutorialappplus.ui.OobActivity;
Line 320 : Remove mOobReceiver.useDefaultStartListener.
OobActivity.java
Remove class
MainActivity.java
Lines 238-240: Remove the following code:
if (TutorialAppPlus.replaceSuggestionRegistrationUI) {
TutorialPlusSuggestionUI.enable();
}AdaptiveAuthenticateTask.java
Line 140: Add an extras parameter to the adaptiveUI.authenticateQr() call.
Line 169: Remove the line quickData.operation = "auth";
RegisterDeviceTask.java
Line 44: Add a null parameter as extras to the adaptiveUI.registerQr() call.
RegisterFragment.java
Line 190: Add an mExtras parameter to the adaptiveUI.getRegistrationFragment() call.
AuthenticateTask.java
Line 167: Replace resultData.quickData.toJson() with resultData.quickData.
RegisterAuthenticatorTask.java
Line 130: Replace data.quickData.toJson() with data.quickData.
FedAuthenticateTask.java
Line 56: Replace new HttpClient(...) with HttpClient.createInstance(TutorialAppPlus.getApp().getApplicationContext()).setUrl(loginURL);
PasswordAuthTask.java
Line 68: replace new HttpClient(...) with HttpClient.createInstance(TutorialAppPlus.getApp().getApplicationContext()).setUrl(loginURL);
ManagementFragment.java
Line 274: Replace
((MainActivity) getActivity()).getAppSDKPlus().resetSuggestRegister();
with
new AdaptiveUI(TutorialAppPlus.getAuthType().getAppSdkPlusConfig()).resetSuggestRegister(callerActivity);
TutorialPlusSuggestionUI.java
Remove class.
SuggestRegistrationTask.java
Line 28: Remove private final IAppSDKPlus mAppSDKPlus;
Line 37: Remove IAppSDKPlus appSDKPlus, parameter from the constructor.
Line 38: Remove mAppSDKPlus = appSDKPlus;
Line 61: Replace
AuthenticationData result = mAppSDKPlus.suggestRegister(params[0], TutorialAppPlus.getApp().getSessionData(), mExtras);
with
AdaptiveUI adaptiveUI = new AdaptiveUI(TutorialAppPlus.getAuthType().getAppSdkPlusConfig());
AdaptiveResult result = adaptiveUI.suggestRegister(params[0], TutorialAppPlus.getApp().getSessionData(), mExtras);SuggestRegistrationViewModel.java
Line 45: Remove the appSDKPlus parameter from the SuggestRegistrationTask constructor call.
Conformance
The Conformance SDK is no longer supported. Remove the Conformance package from your app. In addition, remove the value CONFORMANCESDK from the SdkType enum as well as any usage of that value.
MainActivity.java
Line 156: Remove || TutorialAppPlus.mSelectedSDK == SDKType.CONFORMANCESDK