In Mobile SDK 13.0, we redesigned the login experience on Android. The redesign features a modernized architecture that uses Jetpack Compose and Model-View-ViewModel (MVVM).

Starting in 13.0, you can customize your app’s login screen in LoginViewModel without overriding LoginActivity. If your app makes extensive customizations to LoginActivity, see Breaking Code Changes to adapt your work.

In our redesign of the Android login experience, we made these breaking code changes. The values and functions from these classes have been moved, updated, or removed.

We removed OAuthWebviewHelper in 13.0.

  • val authorizationDisplayType moved to LoginViewModel.
  • val loginUrl moved to LoginViewModel.
  • fun clearCookies() moved to LoginViewModel.
  • inner class AuthWebViewClient : WebViewClient() moved to LoginActivity.
  • fun buildAccountName(username: String?, instanceServer: String?) moved to LoginViewModel.
  • val oAuthClientId/getOAuthClientId() was updated. Set or override var clientId in LoginViewModel.
  • fun makeWebChromeClient() was updated. Override val webChromeClient in LoginActivity.
  • fun makeWebViewClient() was updated. Override val webViewClient in LoginActivity.
  • fun onAuthFlowComplete(tr: OAuth2.TokenEndpointResponse?, nativeLogin: Boolean) was updated. Use the onAuthFlowSuccess(userAccount: UserAccount) function in LoginActivity.
  • fun getAuthorizationUrl(useWebServerAuthentication: Boolean, useHybridAuthentication: Boolean)

We removed OAuthWebviewHelperEvents in 13.0.

  • fun loadingLoginPage(loginUrl: String) was updated. Observe changes in the view model’s loginUrl or selectedServer.
  • fun finish(userAccount: UserAccount?) was updated. Use onAuthFlowSuccess(userAccount: UserAccount) in LoginActivity instead.
  • fun onAccountAuthenticatorResult(authResult: Bundle)
  • fun onClearCookiesClick(v: View?) is now handled in Compose. Override clearCookies() in the view model instead.
  • findViewById<WebView> was updated. Modify or override val webView: WebView in LoginActivity.
  • actionBar/supportActionBar was updated. Customize values like var titleText: String? and var topBarColor: Color? in the view model.
  • fun getOAuthWebviewHelper(...)
  • fun onPickServerClick(v: View?)