-
Notifications
You must be signed in to change notification settings - Fork 11
SDKS-4615: Add Kotlin Journey sample app #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| *.iml | ||
| .gradle | ||
| /local.properties | ||
| /.idea/caches | ||
| /.idea/libraries | ||
| /.idea/modules.xml | ||
| /.idea/workspace.xml | ||
| /.idea/navEditor.xml | ||
| /.idea/assetWizardSettings.xml | ||
| .DS_Store | ||
| /build | ||
| /captures | ||
| .externalNativeBuild | ||
| .cxx | ||
| local.properties |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| <p align="center"> | ||
| <a href="https://github.com/ForgeRock/sdk-sample-apps"> | ||
| <img src="https://www.pingidentity.com/content/dam/picr/nav/Ping-Logo-2.svg" alt="Ping Identity Logo"> | ||
| </a> | ||
| <hr/> | ||
| </p> | ||
|
|
||
| # Journey app using Kotlin | ||
|
|
||
| Ping provides these Android samples to help demonstrate SDK functionality/implementation. They are provided "as is" and are not official products of Ping and are not officially supported. | ||
|
|
||
| This repository contains an example Android project written in Kotlin making use of the SDK. The sample supports the OOTB Journey Login flow. | ||
|
|
||
| # Introduction | ||
|
|
||
| This sample application demonstrates how to integrate the ForgeRock Android SDK into a basic application. The sample app includes examples of the following: | ||
|
|
||
| - OOTB Journey Login flow | ||
|
|
||
| - Displaying authenticated user status. | ||
|
|
||
| - Displaying authenticated token. | ||
|
|
||
| - Ability to logout existing user and restart the login flow. | ||
|
|
||
| - Built with modern Android components (Jetpack Compose, Kotlin). | ||
|
|
||
| ## Requirements | ||
|
|
||
| - Android Studio: Latest version recommended | ||
| - Ping AIC | ||
| - Android API Level: 28 (Android 9.0) or higher | ||
|
|
||
| ## Getting Started | ||
|
|
||
| To try out the Journey Android SDK sample, perform these steps: | ||
| 1. Configure Ping Services | ||
| Ensure that you registered an OAuth 2.0 application for native mobile apps in AIC. More details in this [documentation](https://backstage.forgerock.com/docs/sdks/latest/sdks/serverconfiguration/pingone/create-oauth2-client.html). | ||
|
|
||
| 2. Clone this repo: | ||
|
|
||
| ``` | ||
| git clone https://github.com/ForgeRock/sdk-sample-apps.git | ||
| ``` | ||
| 3. Open the Android sample project(kotlin-journey) in [Android Studio](https://developer.android.com/studio). | ||
| 4. Open the `EnvViewModel.kt` file within the project. | ||
| 5. Locate the TODO and replace the placeholder strings in the Oidc module configuration with the values of your registered OAuth 2.0 application. | ||
| - You can add multiple configurations as shown with `testConfig` and `prodConfig` depending on you Oidc module configuration. | ||
| 6. Go to `journey\build.gradle.kts` and update the value of `appRedirectUriScheme` with the redirect URI schema from your OIDC configuration. | ||
| 7. Connect an Android device or emulator. | ||
| 8. On the **Run** menu, click **Run 'app'**. | ||
|
|
||
| ## Additional Resources | ||
| Ping SDK Documentation: https://docs.pingidentity.com/sdks/latest/sdks/index.html | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| /* | ||
| * Copyright (c) 2026 Ping Identity Corporation. All rights reserved. | ||
| * | ||
| * This software may be modified and distributed under the terms | ||
| * of the MIT license. See the LICENSE file for details. | ||
| */ | ||
|
|
||
| // Top-level build file where you can add configuration options common to all sub-projects/modules. | ||
| plugins { | ||
| alias(libs.plugins.androidApplication) apply false | ||
| alias(libs.plugins.kotlinAndroid) apply false | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # | ||
| # Copyright (c) 2026 Ping Identity Corporation. All rights reserved. | ||
| # | ||
| # This software may be modified and distributed under the terms | ||
| # of the MIT license. See the LICENSE file for details. | ||
| # | ||
|
|
||
| #Gradle | ||
| org.gradle.jvmargs=-Xmx2048M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx2048M" | ||
| org.gradle.caching=true | ||
|
|
||
| #Kotlin | ||
| kotlin.code.style=official | ||
|
|
||
| #Android | ||
| android.useAndroidX=true | ||
| android.nonTransitiveRClass=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| [versions] | ||
| activityCompose = "1.9.3" | ||
| agp = "8.12.2" | ||
| coreSplashscreen = "1.0.1" | ||
| datastore = "1.1.7" | ||
| ping = "2.0.0-beta1" | ||
| kotlin = "2.2.0" | ||
| compose = "1.7.4" | ||
| compose-material3 = "1.3.0" | ||
| coreKtx = "1.13.1" | ||
| appcompat = "1.7.0" | ||
| material = "1.12.0" | ||
| materialIconsExtended = "1.7.4" | ||
| navVersion = "2.8.3" | ||
| composeBom = "2024.10.00" | ||
| coilCompose = "2.4.0" | ||
| coilSvg = "2.4.0" | ||
| androidx-credentials = "1.5.0" | ||
| googleid = "1.1.1" | ||
| facebook-login = "18.0.3" | ||
| serialization = "1.9.0" | ||
| play-services-fido = "21.2.0" | ||
| play-services-auth = "1.5.0" | ||
|
|
||
| [libraries] | ||
| androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activityCompose" } | ||
| androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "coreSplashscreen" } | ||
| androidx-datastore-preferences = { module = "androidx.datastore:datastore-preferences", version.ref = "datastore" } | ||
| androidx-material-icons-extended = { module = "androidx.compose.material:material-icons-extended", version.ref = "materialIconsExtended" } | ||
| androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navVersion" } | ||
| androidx-ui-tooling = { module = "androidx.compose.ui:ui-tooling" } | ||
| compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose" } | ||
| compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose" } | ||
| compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "compose-material3" } | ||
| androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } | ||
| androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } | ||
| kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization" } | ||
| journey = { module = "com.pingidentity.sdks:journey", version.ref = "ping" } | ||
| external-idp = { module = "com.pingidentity.sdks:external-idp", version.ref = "ping" } | ||
| protect = { module = "com.pingidentity.sdks:protect", version.ref = "ping" } | ||
| fido = { module = "com.pingidentity.sdks:fido", version.ref = "ping" } | ||
| binding = { module = "com.pingidentity.sdks:binding", version.ref = "ping" } | ||
| binding-ui = { module = "com.pingidentity.sdks:binding-ui", version.ref = "ping" } | ||
| binding-migration = { module = "com.pingidentity.sdks:binding-migration", version.ref = "ping" } | ||
| device-profile = { module = "com.pingidentity.sdks:device-profile", version.ref = "ping" } | ||
| device-client = { module = "com.pingidentity.sdks:device-client", version.ref = "ping" } | ||
| recaptcha-enterprise = { module = "com.pingidentity.sdks:recaptcha-enterprise", version.ref = "ping" } | ||
| play-services-fido = { module = "com.google.android.gms:play-services-fido", version.ref = "play-services-fido" } | ||
| play-services-auth = { module = "androidx.credentials:credentials-play-services-auth", version.ref = "play-services-auth" } | ||
| material = { group = "com.google.android.material", name = "material", version.ref = "material" } | ||
| androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" } | ||
| coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coilCompose" } | ||
| coil-svg = { module = "io.coil-kt:coil-svg", version.ref = "coilSvg" } | ||
| androidx-credentials-play-services-auth = { group = "androidx.credentials", name = "credentials-play-services-auth", version.ref = "androidx-credentials" } | ||
| googleid = { group = "com.google.android.libraries.identity.googleid", name = "googleid", version.ref = "googleid" } | ||
| facebook-login = { module = "com.facebook.android:facebook-login", version.ref = "facebook-login" } | ||
|
|
||
| [plugins] | ||
| androidApplication = { id = "com.android.application", version.ref = "agp" } | ||
| kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } | ||
| compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } | ||
|
|
13 changes: 13 additions & 0 deletions
13
android/kotlin-journey/gradle/wrapper/gradle-wrapper.properties
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # | ||
| # Copyright (c) 2026 Ping Identity Corporation. All rights reserved. | ||
| # | ||
| # This software may be modified and distributed under the terms | ||
| # of the MIT license. See the LICENSE file for details. | ||
| # | ||
|
|
||
| #Thu Dec 04 13:38:12 PST 2025 | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The app currently crashes upon launching if both
testConfigandprodConfigare not set configured...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, this align with the DaVinci sample App.
I hope developer will look at the Readme before they try out the sample App.
I have added the following comment under the TODO