Migrating Android apps to the Orchestration SDK
PingOne Advanced Identity Cloud PingAM Android
The Orchestration SDK for Android shifts from a callback-based asynchronous model to a modern, coroutine-based approach.
- Legacy ForgeRock SDK for Android - Callbacks
-
The legacy ForgeRock SDK for Android uses
NodeListenerwith methods such asonSuccess,onException, andonCallbackReceived. - New Orchestration SDKs for Android - Coroutines
-
The new Orchestration SDK for Android embraces Kotlin Coroutines.
Methods like
startandnextare suspend functions. This allows for writing asynchronous code in a sequential, synchronous-looking manner.The different outcomes of an operation are handled by the sealed
Nodeclass, includingContinueNode,SuccessNode,ErrorNode, andFailureNodetypes, which allows for exhaustivewhenstatements.
Data model translation
| ForgeRock SDK Class | Orchestration SDK Model | Description |
|---|---|---|
|
|
The The |
|
|
The |
|
|
Errors and exceptions are now handled through sealed classes |
|
|
The |
|
|
The initialization options have been streamlined into a new |
|
|
The |
|
|
|
Library dependency changes
The modular architecture of the Orchestration SDKs means you only have to import the functionality you require in your apps.
The table below shows the dependencies available in the new Orchestration SDK for Android:
| Library | Description |
|---|---|
|
Core Android components for the SDK. |
|
Used for binding devices to user accounts. |
|
UI components for device binding. |
|
Utilities for handling web-based authentication flows. |
|
Common classes for multi-factor authentication. |
|
A client for device-related operations. |
|
Provides a unique device identifier. |
|
Enables device profiling for risk assessment. |
|
Detects if the device is rooted or jailbroken. |
|
Core library for handling authentication journeys. |
|
A plugin for extending journey functionality. |
|
A logging library for the SDK. |
|
Assists with migrating from older SDK versions. |
|
Handles network requests for the SDK. |
|
Implements the OATH (Initiative for Open Authentication) standard. |
|
Provides OpenID Connect (OIDC) functionality. |
|
Handles the orchestration of journey nodes. |
|
Integrates with PingOne Protect for advanced fraud detection. |
|
Manages push notifications for multi-factor authentication. |
|
Provides secure storage for SDK data. |
|
Common utility classes used across the SDK. |
Code change examples
This section covers some of the code changes you will need to make to your ForgeRock SDK for Android apps to adopt the Orchestration SDK instead.
Navigating authentication journeys
| ForgeRock SDK | Orchestration SDK | Parameter Changes | Return Type |
|---|---|---|---|
|
|
Learn more in Starting an authentication journey on Android. |
|
|
|
Learn more in Navigating an authentication journey on Android. |
|
|
Sealed |
For example, ContinueNode, SuccessNode, ErrorNode, and FailureNode. Learn more in Navigating an authentication journey on Android. |
N/A |
Users and sessions
| ForgeRock SDK | Orchestration SDK | Parameter Changes | Return Type |
|---|---|---|---|
|
|
The Orchestration SDK provides a nullable Learn more in Signing users out. |
|
OpenID Connect
| ForgeRock SDK | Orchestration SDK | Parameter Changes | Return Type |
|---|---|---|---|
|
|
Learn more in Managing OIDC tokens. |
|
|
|
Learn more in Managing OIDC tokens. |
|
|
|
Learn more in Managing OIDC tokens. |
|
|
|
Learn more in Managing OIDC tokens. |
|
Error handling
| ForgeRock SDK | Orchestration SDK | Parameter Changes | Return Type |
|---|---|---|---|
|
|
Explicit error type discrimination Learn more in Handling FailureNode and ErrorNode. |
N/A |
Migrating using AI assistants
To help you migrate applications from the legacy ForgeRock SDK for Android to the new Orchestration SDK for Android using an AI assistant, we have created a migration.md file.
This file contains a detailed mapping and example snippets of changes between the two SDK versions, which AI assistants can utilize to help you migrate your app.
This approach is designed to reduce manual effort and improve consistency during the migration process.