Skip to main content

Android SDK V2 Dashboard

The Android compatibility facade exposes a prebuilt account dashboard through OegSdk.showDashboard().

Open the dashboard

Kotlin
// Defaults to portrait
OegSdk.showDashboard()

// Or specify an orientation
OegSdk.showDashboard(orientation = OegSdk.ScreenOrientation.LANDSCAPE)
Java
OegSdk.INSTANCE.showDashboard(OegSdk.ScreenOrientation.PORTRAIT);
ParamTypeDefaultNotes
orientationOegSdk.ScreenOrientationPORTRAITPORTRAIT or LANDSCAPE — locks the dashboard activity to that orientation.

Internally this launches the SDK profile activity in dashboard mode.

What the dashboard provides

  • Current account information
  • Update profile flow
  • Change password flow
  • Language switcher
  • SDK test surfaces such as payment / push hooks
  • Logout

Related entry points

If you want to open specific screens instead of the full dashboard:

Kotlin
OegSdk.showUpdateUserInfo(callback)
OegSdk.showChangePassword(callback)
Java
OegSdk.INSTANCE.showUpdateUserInfo(callback);
OegSdk.INSTANCE.showChangePassword(callback);

Handling logout from the dashboard

When the user taps the Logout button inside the dashboard, the SDK:

  1. Clears the auth session (OEGAuthCore.logout())
  2. Fires onLoginResult on the same AuthenticationCallBack passed to OegSdk.showLogin() — with a failed WorkResult ("Login cancelled")
  3. Dismisses the dashboard and relaunches OEGLoginActivity

This means your onLoginResult implementation must handle both success and non-success results — not just the login-success path:

Kotlin
OegSdk.showLogin(object : AuthenticationCallBack {
override fun onLoginResult(result: WorkResult<AuthenticationInfo>, provider: String?) {
if (result.isSuccess) {
// User logged in — start gameplay
val token = result.data?.apiToken
} else {
// Covers: user closed login screen, logout from dashboard, session force-logout
// Navigate back to your game's own main/login screen
}
}
// ...
})
Java
OegSdk.INSTANCE.showLogin(new AuthenticationCallBack() {
@Override
public void onLoginResult(WorkResult<AuthenticationInfo> result, String provider) {
if (result.isSuccess()) {
// User logged in
} else {
// Logout from dashboard or cancelled — navigate to game login screen
}
}
// ...
});

Common bug: Games that only handle result.isSuccess == true and ignore the error branch will stay on the gameplay screen after the user logs out from the dashboard. Always handle the non-success case.

When to use it

Use the dashboard if:

  • Your game wants a ready-made account/settings surface
  • You are integrating through the OegSdk compatibility layer

Skip it if:

  • You are building a fully custom UI on top of OEGAuth