Along with the Core SDK, we provide another library that provides built-in forms for registering a user and editing it’s profile. Those forms are dynamically built with the information configured in the back office.
In order to install the VYou-UI SDK in your Android application you’ll need to add the following dependency inside your application-level build.gradle file
Also, if you don’t have mavenCentral() as a repository, you should add it to your project-level build.gradle file
Important note Notice that VYou-Core is a dependency inside VYou-UI, so if you add VYou-UI to your project, you don’t need to add the VYou-Core dependency anymore.
Please refer to the VYou-Core setup, as you’ll have to follow all of the steps described on it.
Important note To make VYou-UI SDK work you must replace this line
with the following
As in the VYou-Core setup, you will need to call this function before the onCreate of your Activity or Fragment:
private val vyouUi = VYouUi(this)
As VYou-UI holds a dependency to VYou-Core, all of it’s API will still be available, so please take a look at it if you haven’t done so yet. The VYou-UI SDK provides methods to start the register & edit profile flows from your application
suspend fun startRegister(): VYouResult<Unit>
suspend fun startProfile(credentials: VYouCredentials): VYouResult<Unit>
Those two methods will start a new Activity inside your application, and return the result of any of the flows inside a VYouResult In order to launch the edit profile activity, you must provide the user’s credentials which are easily accessible through
In order to style the forms shown to the user, the SDK is integrated with the built-in theme system inside Android, so everything that’s configurable by the theme should also work inside the SDK. We provide the following example in the sample application
<!-- Base application theme. -->
<style name="Theme.VYou" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<!-- Secondary brand color. -->
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
but everything that’s configurable via theme.xml will also change the display inside the SDK.