I can successfully login to my sandbox application using the sdk in Android. I also have the Rainbow application installed from the play store which we want to use, rather than rewriting all the functionality into our app.
I would like that when I log in using the rainbow sdk, that it also logs the correct user into the main application Rainbow.apk one way or another, as a first step is just login/logout when the user uses our mobile app.
Different users (who have a email/password) can use the same telephone, so this is the requirement that for each user, they are logged into their rainbow account automatically. The use case can be the same for Ios.
Currently I can be logged in with USER A in the Rainbow App, and have a session in my app logged in to Rainbow with USER B. I want to strongly link the twop so I can login using the API and it logs in/disconnects the Rainbow App.
Android specific : Is there any data one can pass to the Intent (token or email/password) to login to the main application "automatically" when I open it from my application? Is there another way with the rainbow sdk and some sort of shared token, intents done by the sdk?
shorthand kotlin android code for what could be done ->
val intent = activity!!.packageManager.getLaunchIntentForPackage("com.ale.rainbow")
// for example
// launchIntent.extras.putString("email", "email@example.com")
startActivity(intent) // launches Rainbow with user/pass to login
The above code obviously does not prevent being logged in to rainbow in our app with different credentials than the play store app, which is essentially what we want to control.
What can be done in Android to solve this problem and from my app, logging in using the API will change the login in the rainbow app ->
I hope it's clear, thanks in advance.
Please sign in to leave a comment.