Created the Application class and start the Forgerock authentication
FRAuth.start(this)
Embedded Login
create a MainActivity class and have a login, status and logout button
Add Forgerock Login , Logout Listener for the buttons
Create a Dialog Fragment with username, password, cancel, next button
On click of Login button, Invoke the DialogFragment from success of Journey/tree callback to display username/password dialog
Add the Listener for the next button on the Dialog fragment which will take the input from username and password field and execute the three step login process
You will receive a SSO token or tokenId from the authentication journey/tree response
Use that SSO token to fetch the redirect URI and authcode
Exchange the authcode to get and oauth tokens and this is the Final step
update the Login logout status in Main activity once you received the access token, refresh token , idToken
Get the User Info in a different Fragment screen
Centralized Login
create a build variant to run two different product flavours in build.gradle, so that you can use the same code to run centralized and embedded login
Add the URI scheme for the app for centralize login