on 2022 Aug 30 10:42 AM
Hi experts,
I'm working on SAP Android 4.0.0. My requirement is to add, on the Basic Auth Screen of the flow, a link or a button to trigger the navigation to a custom Activity. At the end of the custom activity, user should get back to the basic auth screen.
I know how to change the screen and add the button but what would be the best strategy to trigger a navigation to my custom activity ? Is it possible ? Do we have some examples ?
I would like to thanks in advance for your help.
Yohann
Request clarification before answering.
Hi,
I found the current solution to enhancement the behavior of the BasicAuthenticationScreen :
class BasicAuthenticationEnhancedScreen @JvmOverloads constructor(context : Context, attrs : AttributeSet? = null, defStyleAttr : Int = 0, defStyleRes : Int = 0) : BasicAuthenticationScreen(context,attrs, defStyleAttr, defStyleRes) {
init{
findViewById<Button>(R.id.basic_auth_screen_reset_button)?.let{
it.setOnClickListener {
//some logic here
}
}
}
}
3. I've added the custom view in the copy of the layout :
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/stepBasicAuth"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com...mdui.common.BasicAuthenticationEnhancedScreen
android:id="@+id/basicAuthenticationScreen"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</FrameLayout>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Yohann
SAP BTP SDK for Android 4.0 has a feature to let the client code insert custom steps at various points during the onboarding process, which could be able to help in this case. I have a blog post on this here: https://blogs.sap.com/2021/12/30/customizing-the-onboarding-flow-with-sap-btp-sdk-for-android-4.0/
In your case, would you please try the following:
https://developer.android.com/training/basics/intents/result#registerhttps://developer.android.com/t...Hope this works for you.
Best
Qiang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Qiang,
thanks a lot for your quick answer.
Sorry, if I wasn't be clear.
Our requirment is to put a "reset password" link (or a button) on the basic auth screen to trigger a custom screen(activity). This screen gives the posssibility to the user to reset the password. Our client have a legacy API (on premise backend) reseting the password, we should call in this custom screen (i.e It sends mail with some instruction) After the password reset done, we should come back on the basic auth screen.
When I talk about screen modification, I mean the layouts. We customed the standard flow layouts by copy the xml files in our own package. So I know I can just add a button on the layout basic auth screen.
My question is, how can I enhance the current basic auth screen to put some code behind this new button click ? Is it possible directly ? If it's not, I have thinked about custom flow ? Is it possible to replace the current basic auth screen by a custom ? Or have a solution to fill our requirment ?
Thanks a lot
Yohann
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
30 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.