Android Ready UX SDK
To get started quickly with FriendlyScore Connect for Android, clone the GitHub repository and run the example. You will need to sign-up for the free API keys through our Developer Console.
- Install or update Android Studio to version 3.2 or greater
- We support Android 5.0 and greater
- FriendlyScore Client Id
The easiest way to get started is to clone the repository https://github.com/FriendlyScore/FriendlyScore-Connect-Android-Example. Please follow the instructions below to provide the necessary configuration and to understand the flow.
In your project-level Gradle file (build.gradle), add rules to include the Android Gradle plugin. The version should be equal to or greater than 3.2.1
In your project-level Gradle file (build.gradle), add the maven repository from which you will download the friendlyscore connect library
In the project-level gradle.properties file please add the following configuration values
Add the following values to your app-level build.gradle file (in the demo app/build.gradle). Now we must read the configuration to create the string resources that will be used by the FriendlyScore Android SDK.
In your module or app-level gradle file (in the demo app/build.gradle) please add the FriendlyScore Android SDK library listed below to your list of dependencies
In order to start FriendlyScore for your customer you must have the userReference for that customer. The userReference uniquely identifies the customer in your systems. This userReference can then be used to access information from the FriendlyScore API.
In order to listen when the customer returns from the FriendlyScoreView in your onActivityResult, you must provide the requestcode that you will be using
You can select which environment you want to use the FriendlyScore SDK in.
|sandbox||Use this environment to test your integration|
|production||Use this environment when deploying the live application|
These environments are listed in the SDK as below
Define the environment variable
FriendlyScoreConnect can be presented with a light (default) or dark theme, which are predefined list of colors and icons. To use custom colors for the categories, you must override the color keys in your application. You can also create a custom theme and use that value when you trigger the ConnectUI. Custom theme example is included in the styles.xml. The color keys and descriptions are in the Colors section. You must extend the Default theme while creating the custom theme as shown below
The existing themes for Connect are declared below
Initiate FriendlyScoreView using the above values
|connectBackgroundColor||Background color for all views in the SDK|
|connectDividerColor||Divider color for all view in the SDK|
|connectCancelButtonColor||Background color for Cancel, Disconnect Buttons|
|connectNextButtonColor||Background color for Next, Confirm Button|
|connectButtonTextColor||Text color for Buttons|
|connectBankDetailMarkerColor||Color for the marker on the detail view for a connected bank|
|connectNavigationButtonBackgroundColor||Background color for navigation button in the toolbar|
|connectNavigationBackButtonItems||Color of the back button for the navigation button|
|connectToolbarIconsColor||Color for the search icon in the toolbar|
|connectToolbarTextColor||Color for the search field cursor|
|connectToolbarSearchTextColor||Color for the search text query|
|connectToolbarSearchCursorColor||Color for the search field cursor|
|connectBankItemBackgroundColor||Background color for bank item in the list of banks|
|connectBankItemTextColor||Text color for bank item in the list of banks|
|connectBankItemDisabledTextColor||Text color for bank item if its disabled or not available in the list of banks|
|connectBankItemBorderColor||Border color for the bank item in the list of banks|
|connectedBankItemConnectedStatusColor||Color of the connected status icon for the bank item in the list of banks|
|connectBankItemUnavailableStatusColor||Color of the unavailable status icon for the bank item in the list of banks|
|connectFilterHeaderDisabledColor||Color for the filter header background color|
|connectFilterPageTitleColor||Color for the filter header text color|
|connectFilterPageSubTitleColor||Color for the filter item text color|
If you need to know when the user returns from the FriendlyScore Flow add this to your Activity or Fragment. The onActivityResult is called when the SDK is closed. The data object returned in onActivityResult contains both errors and events.
|userReferenceAuthError||Present if there was an authentication error for the supplied userReference.|
|serviceDenied||Present if service was denied. Please check the description for more information.|
|incompleteConfiguration||Present if the configuration on the server is incomplete. Please check the description for more information.|
|serverError||Present if there was a critical error on the server.|
|userClosedView||Present if the customer Closed the FriendlyScore Flow.|
|userCompletedFlow||Present if the customer Completed the FriendlyScore flow.|
Was this article helpful?
Friendly Score UK Ltd.
52 Brook Street 1st Floor, Mayfair
London W1K 5DS
Call us on +44 20 3709 6726
Company registered in England
Company number 09168668, ICO ZA111687
VAT registration number 206 9758 80
Authorised and Regulated by the Financial Conduct Authority. (FRN: 781963)