-
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
Conversation
spetrov
left a comment
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.
Looks great!
I have only 2 minor comment that you may want to take a look into...
| 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. |
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 testConfig and prodConfig are not set configured...
com.pingidentity.samples.journeyapp E FATAL EXCEPTION: main (Ask Gemini)
Process: com.pingidentity.samples.journeyapp, PID: 3975
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:576)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:566)
... 1 more
Caused by: java.net.MalformedURLException: no protocol: <Discovery Endpoint>
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
/*
* TODO
* This configuration allows you to provide 2 different environments: testConfig and prodConfig.
* You must provide valid information for the sample app to work.
* (If an invalid discoveryEndpoint format is provided, the app may crash)
*
* The sample app uses the clientId to differentiate the environment.
* Use a different clientId for testing.
*/
| option = it, | ||
| envViewModel.current.clientId == it.clientId | ||
| ) { | ||
| envViewModel.select(it) |
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.
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.
See above comments.
vibhorgoswami
left a comment
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.
LGTM
This commit introduces a new sample application, "kotlin-journey," built with Kotlin and Jetpack Compose to demonstrate the Android SDK's capabilities. Key features include: - Integration of the Journey SDK for handling authentication flows. - Implementation of various callback types, including `SelectIdpCallback`, `DeviceBindingCallback`, and `PingOneProtect`. - A modern UI built with Jetpack Compose, featuring Material 3 components, custom themes, and navigation. - A `UserProfile` screen to display user information and manage associated devices. - A `Token` screen for viewing and managing access tokens. - An environment selection screen to switch between server configurations.

This commit introduces a new sample application, "kotlin-journey," built with Kotlin and Jetpack Compose to demonstrate the Android SDK's capabilities.
Key features include:
SelectIdpCallback,DeviceBindingCallback, andPingOneProtect.UserProfilescreen to display user information and manage associated devices.Tokenscreen for viewing and managing access tokens.