From c2f29d687298378edd7480b30a82fae48b3e401a Mon Sep 17 00:00:00 2001 From: dalia Date: Tue, 29 Mar 2022 16:41:46 +0300 Subject: [PATCH 1/9] Add integration, update and major version migration guides. --- Migration.md | 217 +++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 93 +++++++++++++++++++++- 2 files changed, 309 insertions(+), 1 deletion(-) create mode 100644 Migration.md diff --git a/Migration.md b/Migration.md new file mode 100644 index 0000000..dd2895d --- /dev/null +++ b/Migration.md @@ -0,0 +1,217 @@ +# Migrating to Link 4 +## Learn how to switch over to the newest Link version. +If you are looking to integrate Argyle Link for the first time navigate to [integration guide](https://github.com/argyle-systems/argyle-link-android#readme). + +- [Android SDK upgrade guide](#android-sdk-upgrade-guide) +- [Migrating from Link 2](#migrating-from-link-2) +- [Migrating from Link 3](#migrating-from-link-3) + +--- +## Android SDK upgrade guide +### Review the changes in the latest version +Before you upgrade to a new version of the Link SDK, you should review the [Releases page](https://github.com/argyle-systems/argyle-link-android/releases). This will help you to understand any changes that you will need to make in your code as the result of an upgrade. + +We strongly recommend upgrading the SDK as soon as there is a new version available. Doing so will help you to provide the best Argyle Link experience in your application. + +--- +### Upgrade to a new SDK version +**The minimum supported Android version is Android 6.0 (API level 23).** + +- In your app module gradle file (typically found at `app/build.gradle`) locate the Argyle dependency within your dependencies block and increment the version number according to the latest version number displayed in the [Releases page](https://github.com/argyle-systems/argyle-link-android/releases). + +``` +implementation 'com.argyle:argyle-plugin-android-source:' +``` + +- To verify the change initiate a gradle sync and confirm no errors. + +- If you are using pro-guard, make sure you have the most up-to-date Proguard rules which can be found in our [integration guide](https://github.com/argyle-systems/argyle-link-android#readme). + + + +--- +## Migrating from Link 3 +### Updated configuration attribute + +If you're using a previous version of Link and would like to migrate to the new version, please find below the single changed configuration attribute. + +--- + +**pluginKey: renamed** + +The property was renamed to `linkKey`. + +--- + +## Updated error code + +A name of the error code returned via `onError` callback is also changed to reflect the update of configuration attribute. + +--- + +[Link Initialization error](https://argyle.com/docs/developer-tools/link-initialization-errors#) **invalid_plugin_key: renamed** + +The error was renamed to `invalid_link_key`. + +--- +## Migrating from Link 2 + +If you're using Link version 2 and would like to migrate to the newest version, please find below a list of all configuration attributes that have been removed or changed. + +### Updated configuration attributes + +--- +**pluginKey: renamed** + +The property was renamed to `linkKey`. + +--- +**payDistributionConfig and payDistributionUpdateFlow: changed** + +Where previously it was enough to set the `payDistributionConfig` to trigger the pay distribution update flow, it is now required that you also explicitly enable the flow by using the `payDistributionUpdateFlow` configuration parameter. + +--- +**dataPartners: renamed** + +The property was renamed to `linkItems`. + +--- +**addIncomeSourceLinkVisible: removed** + +`addIncomeSourceLinkVisible` is no longer available. The "Can't find your company?" button is enabled whenever the `onCantFindLinkItemClicked` callback is defined. The button title can be changed by using the `cantFindLinkItemTitle` attribute. + +--- +**onAddIncomeSourceLinkClicked: renamed** + +`onAddIncomeSourceLinkClicked` callback is no longer available. Instead, please use `onCantFindLinkItemClicked`. + +--- +**addIncomeSourceExitButtonTitle, addIncomeSourceLinkTitle: removed** + +The `addIncomeSourceExitButtonTitle` and `addIncomeSourceLinkTitle` attributes are no longer available. The flow of adding non-covered Link items was removed. + +--- +**showIntroScreen, introTitle, introSubtitle: removed** + +The `showIntroScreen`, `introTitle`, and `introSubtitle` attributes are no longer available. The intro screen has been redesign to immediately show the search bar and thus the intro screen is now shown in most Link integrations. You can customize the search placeholder in the intro screen by using the `introSearchPlaceholder` configuration attribute. The intro screen will be hidden when using the `linkItems` attribute to provide a single Link item ID and deeplink a user straight into the company login screen. + +--- +**showPlatformsToggle: renamed** + +The `showPlatformsToggle` attribute is no longer available. The "Platforms" tab has been redesigned. Please use the `showCategories` parameter to control if the user can see the new All/Employer/Gig/Platform tabs. + +--- +**Callbacks: onAccountCreated, onAccountConnected, onAccountUpdated, onAccountRemoved: changed** + +Callbacks remain the same except that the `dataPartnerId` parameter is now renamed to `linkItemId`. + +--- +### New configuration attributes + + +Please find below a list of all new configuration attributes available since Link 3. + +--- + +**linkItems** `array of strings` `optional` + +Use this parameter to limit the number of Link items that your users can connect to. Provide an array of [Link item](https://argyle.com/docs/developer-tools/api-reference#companies-and-platforms-link-items) IDs you want Argyle Link to display in the company selection screen. The order in which you list the IDs will define the order in which they are displayed in the UI. + +Defaults to `[]`, which shows all available Link items. + +If you provide a single Link item ID, the company selection screen will be skipped and the user will be navigated directly to the Link item login screen. + +--- +**introSearchPlaceholder** `string` `optional` +Placeholder text in the search box in the intro screen of Link. + +Defaults to "Find and link your employer". + +--- +**showCategories** `bool` `optional` + +Show/hide category tabs (e.g. All, Employer, Gig, Payroll). + +Defaults to `true`. + +--- +**searchScreenTitle** `string` `optional` + +The main title in the search screen. + +Defaults to "Search for your income source". + +--- +**searchScreenSubtitle** `string` `optional` + +The subtitle in the search screen. + +Defaults to "Find your employer, gig platform, or payroll provider." + +--- +**cantFindLinkItemTitle** `string` `optional` + +The title for the **Can't find your employer?** button when no Link item is available. + +Defaults to "Can't find your employer?". + +--- +**onCantFindLinkItemClicked** `func` `optional` + +An optional callback triggered after the **Can't find your employer?** button is clicked. + +When clicked, this button redirects the users to a [questionnaire](https://argyle.com/docs/developer-tools/api-reference#user-management-forms) to provide their employer name and associated payroll platform (if available). + +After the users submit the questionnaire, there are two possible scenarios for the user: + +- If the document upload feature is enabled, the users will be asked to upload their income verification documents. Refer to [Document upload guide](https://argyle.com/docs/products/document-upload) for further information. +- If the document upload feature is disabled, the user will quit the Argyle flow. + The **Can't find your employer?** button is shown by default. It can be disabled via the [Link Customizer](https://console.argyle.com/customizer). + +Link will close by default if this callback is defined and triggered on the SDK. + +The callback function will receive an object containing a search query that was entered by the user. + +--- +**showBackToSearchButton** `bool` `optional` + +If set to `false`, hides the back to search button in the success screen. + +The default value is `true`. + +--- +**payDistributionUpdateFlow** `bool` `optional` + +If `payDistributionUpdateFlow` is set to `true` and the `payDistributionConfig` parameter is provided, the pay distribution update flow will be initiated right after an account gets connected. + +If this is set to `true` but the `payDistributionConfig` is not set, Link will not initialize properly. + +Defaults to `false`. + +--- +**onPayDistributionSuccess** `func` `optional` + +A callback function invoked after a successful pay distribution update flow. + +The function will be passed an object containing `accountId`, `userId`, and `linkItemId`. + +--- +**onPayDistributionError** `func` `optional` + +A callback function invoked after an error occurs during the pay distribution update flow. + +The function will be passed an object containing `accountId`, `userId`, and `linkItemId`. + +--- + +### Updated error code + +A name of the error code returned via `onError` callback is also changed to reflect the update of configuration attribute. + +--- + +[Link Initialization error](https://argyle.com/docs/developer-tools/link-initialization-errors#) **invalid_plugin_key: renamed** + +The error was renamed to `invalid_link_key`. + +--- \ No newline at end of file diff --git a/README.md b/README.md index f486d9f..e0b11b1 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,94 @@ # Argyle Android SDK example project +Android Link SDK provides a way to integrate [Argyle Link](https://argyle.io/docs/argyle-link) into your Android app. -Documentation can be found [here](https://argyle.io/docs/argyle-link/android-sdk-integration) +If you are looking to update Argyle Link to the newest version, navigate to [upgrade guide](https://github.com/argyle-systems/argyle-link-android/blob/master/Migration.md). + +**The SDK supports API level 23 and above ([distribution stats](https://developer.android.com/about/dashboards)).** + +**Note:** We recommend you to lock your app to portrait orientation. + +--- +- **Important:** When using tools like Proguard to obfuscate your code, make sure to exclude Android Link SDK package (`com.argyle.*`) from the process, it may cause unexpected runtime issues otherwise. You can do this by adding this line to your `proguard-rules.pro:-keep class com.argyle. { *; }` + +Our target configuration is currently set to the following: + +- `minSdkVersion = 23` +- `compileSdkVersion = 30` +- `targetSdkVersion = 30` +- `Android Support Library = 28.0.0` +- `Kotlin = 1.4.32` + +### 1. Adding the SDK dependency +``` +dependencies { + implementation 'com.argyle:argyle-plugin-android-source:3.x.x' +} +``` + +### 2. Creating the SDK configuration +```kotlin +val config = ArgyleConfig.Builder() + .loginWith("YOUR_LINK_KEY", "https://api-sandbox.argyle.com/v1", "USER_TOKEN") + //.linkItems(arrayOf("lyft", "uber")) + .setCallbackListener(object : Argyle.ArgyleResultListener { + + override fun onUserCreated(userToken: String, userId: String) { + Log.d("Result", "onUserCreated: userId: $userId, userToken: $userToken") + } + + override fun onAccountCreated(accountId: String, userId: String, linkItemId: String) { + Log.d("Result", "onAccountCreated: accountId: $accountId, userId: $userId, linkItemId: $linkItemId") + } + + override fun onAccountConnected(accountId: String, userId: String, linkItemId: String) { + Log.d("Result", "onAccountConnected: accountId: $accountId, userId: $userId, linkItemId: $linkItemId") + } + + override fun onAccountUpdated(accountId: String, userId: String, linkItemId: String) { + Log.d("Result", "onAccountUpdated: accountId: $accountId, userId: $userId, linkItemId: $linkItemId") + } + + override fun onAccountRemoved(accountId: String, userId: String, linkItemId: String) { + Log.d("Result", "onAccountRemoved: accountId: $accountId, userId: $userId, linkItemId: $linkItemId") + } + + override fun onAccountError(accountId: String, userId: String, linkItemId: String) { + Log.d("Result", "onAccountError: accountId: $accountId, userId: $userId, linkItemId: $linkItemId") + } + + override fun onPayDistributionSuccess(accountId: String, userId: String, linkItemId: String) { + Log.d("Result", "onPayDistributionSuccess: accountId: $accountId, userId: $userId, linkItemId: $linkItemId") + } + + override fun onPayDistributionError(accountId: String, userId: String, linkItemId: String) { + Log.d("Result", "onPayDistributionError: accountId: $accountId, userId: $userId, linkItemId: $linkItemId") + } + + override fun onError(error: ArgyleErrorType) { + Log.d("Result", "onError: error: $error") + } + + override fun onTokenExpired(handler: (String) -> Unit) { + handler("new_token") + } + + override fun onUIEvent(name: String, properties: Map) { + Log.d("Result", "onUIEvent: $name, properties: $properties") + } + + override fun onClose() { + Log.d("Result", "onClose") + } + }) + .build() +``` + +### 3. Starting the flow +```kotlin +Argyle.instance.init(config); +Argyle.instance.startSDK(this) +``` + +#### Closing Link programmatically + +Normally, Link is closed by the user but it can also be closed by calling `Argyle.instance.close()` \ No newline at end of file From b4a588fe60e002d625d84a7e46e51f485459e4f0 Mon Sep 17 00:00:00 2001 From: dalia Date: Tue, 29 Mar 2022 16:50:44 +0300 Subject: [PATCH 2/9] Add integration, update and major version migration guides. --- Migration.md | 4 +--- README.md | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Migration.md b/Migration.md index dd2895d..d9bad9d 100644 --- a/Migration.md +++ b/Migration.md @@ -27,8 +27,6 @@ implementation 'com.argyle:argyle-plugin-android-source: Date: Wed, 30 Mar 2022 13:31:01 +0300 Subject: [PATCH 3/9] Remove migrating from Link 2 --- Migration.md | 164 +-------------------------------------------------- 1 file changed, 1 insertion(+), 163 deletions(-) diff --git a/Migration.md b/Migration.md index d9bad9d..18feaeb 100644 --- a/Migration.md +++ b/Migration.md @@ -1,9 +1,8 @@ # Migrating to Link 4 -## Learn how to switch over to the newest Link version. +## Learn how to upgrade to the newest Link version. If you are looking to integrate Argyle Link for the first time navigate to [integration guide](https://github.com/argyle-systems/argyle-link-android#readme). - [Android SDK upgrade guide](#android-sdk-upgrade-guide) -- [Migrating from Link 2](#migrating-from-link-2) - [Migrating from Link 3](#migrating-from-link-3) --- @@ -41,167 +40,6 @@ The property was renamed to `linkKey`. --- -## Updated error code - -A name of the error code returned via `onError` callback is also changed to reflect the update of configuration attribute. - ---- - -[Link Initialization error](https://argyle.com/docs/developer-tools/link-initialization-errors#) **invalid_plugin_key: renamed** - -The error was renamed to `invalid_link_key`. - ---- -## Migrating from Link 2 - -If you're using Link version 2 and would like to migrate to the newest version, please find below a list of all configuration attributes that have been removed or changed. - -### Updated configuration attributes - ---- -**pluginKey: renamed** - -The property was renamed to `linkKey`. - ---- -**payDistributionConfig and payDistributionUpdateFlow: changed** - -Where previously it was enough to set the `payDistributionConfig` to trigger the pay distribution update flow, it is now required that you also explicitly enable the flow by using the `payDistributionUpdateFlow` configuration parameter. - ---- -**dataPartners: renamed** - -The property was renamed to `linkItems`. - ---- -**addIncomeSourceLinkVisible: removed** - -`addIncomeSourceLinkVisible` is no longer available. The "Can't find your company?" button is enabled whenever the `onCantFindLinkItemClicked` callback is defined. The button title can be changed by using the `cantFindLinkItemTitle` attribute. - ---- -**onAddIncomeSourceLinkClicked: renamed** - -`onAddIncomeSourceLinkClicked` callback is no longer available. Instead, please use `onCantFindLinkItemClicked`. - ---- -**addIncomeSourceExitButtonTitle, addIncomeSourceLinkTitle: removed** - -The `addIncomeSourceExitButtonTitle` and `addIncomeSourceLinkTitle` attributes are no longer available. The flow of adding non-covered Link items was removed. - ---- -**showIntroScreen, introTitle, introSubtitle: removed** - -The `showIntroScreen`, `introTitle`, and `introSubtitle` attributes are no longer available. The intro screen has been redesign to immediately show the search bar and thus the intro screen is now shown in most Link integrations. You can customize the search placeholder in the intro screen by using the `introSearchPlaceholder` configuration attribute. The intro screen will be hidden when using the `linkItems` attribute to provide a single Link item ID and deeplink a user straight into the company login screen. - ---- -**showPlatformsToggle: renamed** - -The `showPlatformsToggle` attribute is no longer available. The "Platforms" tab has been redesigned. Please use the `showCategories` parameter to control if the user can see the new All/Employer/Gig/Platform tabs. - ---- -**Callbacks: onAccountCreated, onAccountConnected, onAccountUpdated, onAccountRemoved: changed** - -Callbacks remain the same except that the `dataPartnerId` parameter is now renamed to `linkItemId`. - ---- -### New configuration attributes - - -Please find below a list of all new configuration attributes available since Link 3. - ---- - -**linkItems** `array of strings` `optional` - -Use this parameter to limit the number of Link items that your users can connect to. Provide an array of [Link item](https://argyle.com/docs/developer-tools/api-reference#companies-and-platforms-link-items) IDs you want Argyle Link to display in the company selection screen. The order in which you list the IDs will define the order in which they are displayed in the UI. - -Defaults to `[]`, which shows all available Link items. - -If you provide a single Link item ID, the company selection screen will be skipped and the user will be navigated directly to the Link item login screen. - ---- -**introSearchPlaceholder** `string` `optional` -Placeholder text in the search box in the intro screen of Link. - -Defaults to "Find and link your employer". - ---- -**showCategories** `bool` `optional` - -Show/hide category tabs (e.g. All, Employer, Gig, Payroll). - -Defaults to `true`. - ---- -**searchScreenTitle** `string` `optional` - -The main title in the search screen. - -Defaults to "Search for your income source". - ---- -**searchScreenSubtitle** `string` `optional` - -The subtitle in the search screen. - -Defaults to "Find your employer, gig platform, or payroll provider." - ---- -**cantFindLinkItemTitle** `string` `optional` - -The title for the **Can't find your employer?** button when no Link item is available. - -Defaults to "Can't find your employer?". - ---- -**onCantFindLinkItemClicked** `func` `optional` - -An optional callback triggered after the **Can't find your employer?** button is clicked. - -When clicked, this button redirects the users to a [questionnaire](https://argyle.com/docs/developer-tools/api-reference#user-management-forms) to provide their employer name and associated payroll platform (if available). - -After the users submit the questionnaire, there are two possible scenarios for the user: - -- If the document upload feature is enabled, the users will be asked to upload their income verification documents. Refer to [Document upload guide](https://argyle.com/docs/products/document-upload) for further information. -- If the document upload feature is disabled, the user will quit the Argyle flow. - The **Can't find your employer?** button is shown by default. It can be disabled via the [Link Customizer](https://console.argyle.com/customizer). - -Link will close by default if this callback is defined and triggered on the SDK. - -The callback function will receive an object containing a search query that was entered by the user. - ---- -**showBackToSearchButton** `bool` `optional` - -If set to `false`, hides the back to search button in the success screen. - -The default value is `true`. - ---- -**payDistributionUpdateFlow** `bool` `optional` - -If `payDistributionUpdateFlow` is set to `true` and the `payDistributionConfig` parameter is provided, the pay distribution update flow will be initiated right after an account gets connected. - -If this is set to `true` but the `payDistributionConfig` is not set, Link will not initialize properly. - -Defaults to `false`. - ---- -**onPayDistributionSuccess** `func` `optional` - -A callback function invoked after a successful pay distribution update flow. - -The function will be passed an object containing `accountId`, `userId`, and `linkItemId`. - ---- -**onPayDistributionError** `func` `optional` - -A callback function invoked after an error occurs during the pay distribution update flow. - -The function will be passed an object containing `accountId`, `userId`, and `linkItemId`. - ---- - ### Updated error code A name of the error code returned via `onError` callback is also changed to reflect the update of configuration attribute. From 03a329ef4dde887ce6c05226d2cc832bfb25ac01 Mon Sep 17 00:00:00 2001 From: dalia Date: Thu, 31 Mar 2022 11:07:11 +0300 Subject: [PATCH 4/9] Restructure upgrade guide. --- README.md | 2 +- Migration.md => UPGRADING.md | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) rename Migration.md => UPGRADING.md (86%) diff --git a/README.md b/README.md index 28daea9..8a0f0a6 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Argyle Android SDK example project Android Link SDK provides a way to integrate [Argyle Link](https://argyle.io/docs/argyle-link) into your Android app. -If you are looking to update Argyle Link to the newest version, navigate to [upgrade guide](https://github.com/argyle-systems/argyle-link-android/blob/master/Migration.md). +If you are looking to update Argyle Link to the newest version, navigate to [upgrade guide](https://github.com/argyle-systems/argyle-link-android/blob/master/UPGRADING.md). **The SDK supports API level 23 and above ([distribution stats](https://developer.android.com/about/dashboards)).** diff --git a/Migration.md b/UPGRADING.md similarity index 86% rename from Migration.md rename to UPGRADING.md index 18feaeb..c396035 100644 --- a/Migration.md +++ b/UPGRADING.md @@ -1,9 +1,10 @@ -# Migrating to Link 4 +# Android SDK version upgrade guide + ## Learn how to upgrade to the newest Link version. If you are looking to integrate Argyle Link for the first time navigate to [integration guide](https://github.com/argyle-systems/argyle-link-android#readme). - [Android SDK upgrade guide](#android-sdk-upgrade-guide) -- [Migrating from Link 3](#migrating-from-link-3) +- [Migrating to Link 4](#migrating-to-link-4) --- ## Android SDK upgrade guide @@ -27,6 +28,10 @@ implementation 'com.argyle:argyle-plugin-android-source: Date: Thu, 31 Mar 2022 11:52:35 +0300 Subject: [PATCH 5/9] Remove pluginKey rename step from migration guide. --- UPGRADING.md | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/UPGRADING.md b/UPGRADING.md index c396035..b32929f 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -30,27 +30,16 @@ implementation 'com.argyle:argyle-plugin-android-source: Date: Tue, 5 Apr 2022 17:23:38 +0300 Subject: [PATCH 6/9] Add information on link key and user tokens, remove redundant code snippet. --- README.md | 81 +++++++--------------------------------------------- UPGRADING.md | 6 +--- 2 files changed, 12 insertions(+), 75 deletions(-) diff --git a/README.md b/README.md index 8a0f0a6..e6fe2f4 100644 --- a/README.md +++ b/README.md @@ -13,82 +13,23 @@ If you are looking to update Argyle Link to the newest version, navigate to [upg Our target configuration is currently set to the following: - `minSdkVersion = 23` -- `compileSdkVersion = 30` -- `targetSdkVersion = 30` -- `Android Support Library = 28.0.0` - `Kotlin = 1.4.32` -### 1. Adding the SDK dependency +## 1. Add the SDK dependency ``` dependencies { - implementation 'com.argyle:argyle-plugin-android-source:3.x.x' + implementation 'com.argyle:argyle-plugin-android-source:4.x.x' } ``` -### 2. Creating the SDK configuration -```kotlin -val config = ArgyleConfig.Builder() - .loginWith("YOUR_LINK_KEY", "https://api-sandbox.argyle.com/v1", "USER_TOKEN") - //.linkItems(arrayOf("lyft", "uber")) - .setCallbackListener(object : Argyle.ArgyleResultListener { +## 2. Configure and integrate Link +### 1. Access your Link API Key +1. Log into your [Console](https://console.argyle.com/api-keys) instance +2. Navigate to the [API Keys](https://console.argyle.com/api-keys) area under the Developer menu +3. Copy your Sandbox or Production Link API Key for use in the next step - override fun onUserCreated(userToken: String, userId: String) { - Log.d("Result", "onUserCreated: userId: $userId, userToken: $userToken") - } - - override fun onAccountCreated(accountId: String, userId: String, linkItemId: String) { - Log.d("Result", "onAccountCreated: accountId: $accountId, userId: $userId, linkItemId: $linkItemId") - } - - override fun onAccountConnected(accountId: String, userId: String, linkItemId: String) { - Log.d("Result", "onAccountConnected: accountId: $accountId, userId: $userId, linkItemId: $linkItemId") - } - - override fun onAccountUpdated(accountId: String, userId: String, linkItemId: String) { - Log.d("Result", "onAccountUpdated: accountId: $accountId, userId: $userId, linkItemId: $linkItemId") - } - - override fun onAccountRemoved(accountId: String, userId: String, linkItemId: String) { - Log.d("Result", "onAccountRemoved: accountId: $accountId, userId: $userId, linkItemId: $linkItemId") - } - - override fun onAccountError(accountId: String, userId: String, linkItemId: String) { - Log.d("Result", "onAccountError: accountId: $accountId, userId: $userId, linkItemId: $linkItemId") - } - - override fun onPayDistributionSuccess(accountId: String, userId: String, linkItemId: String) { - Log.d("Result", "onPayDistributionSuccess: accountId: $accountId, userId: $userId, linkItemId: $linkItemId") - } - - override fun onPayDistributionError(accountId: String, userId: String, linkItemId: String) { - Log.d("Result", "onPayDistributionError: accountId: $accountId, userId: $userId, linkItemId: $linkItemId") - } - - override fun onError(error: ArgyleErrorType) { - Log.d("Result", "onError: error: $error") - } - - override fun onTokenExpired(handler: (String) -> Unit) { - handler("new_token") - } - - override fun onUIEvent(name: String, properties: Map) { - Log.d("Result", "onUIEvent: $name, properties: $properties") - } - - override fun onClose() { - Log.d("Result", "onClose") - } - }) - .build() -``` - -### 3. Starting the flow -```kotlin -Argyle.instance.init(config); -Argyle.instance.startSDK(this) -``` - -#### Closing Link programmatically +### 2. Utilize user tokens +For successful implementation you need to make sure to utilize user tokens correctly. Learn how to do it in Argyle [returning user experience guide](https://argyle.com/docs/products/returning-users-experience#suggested-flow-for-user-token-usage) before continuing onto the next step. -Normally, Link is closed by the user but it can also be closed by calling `Argyle.instance.close()` +### 3. Integrate Link +See [Example](https://github.com/argyle-systems/argyle-link-android/blob/master/app/src/main/java/com/argyleexample/MainActivity.kt) for sample implementation. diff --git a/UPGRADING.md b/UPGRADING.md index b32929f..8cb2140 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -30,11 +30,7 @@ implementation 'com.argyle:argyle-plugin-android-source: Date: Tue, 5 Apr 2022 19:06:58 +0300 Subject: [PATCH 7/9] Mention removed configuration parameters. --- UPGRADING.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/UPGRADING.md b/UPGRADING.md index 8cb2140..e2d5e2b 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -30,7 +30,33 @@ implementation 'com.argyle:argyle-plugin-android-source: Date: Wed, 6 Apr 2022 10:20:01 +0300 Subject: [PATCH 8/9] Rephrase removed parameter description. --- UPGRADING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/UPGRADING.md b/UPGRADING.md index e2d5e2b..4c0286d 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -41,17 +41,17 @@ Please find below a list of all configuration attributes that have been removed **introSearchPlaceholder: removed** -Became redundant as search is no longer available in the [Intro screen](https://argyle.com/docs/products/link-4#intro-screen). +Became redundant due to [Intro screen](https://argyle.com/docs/products/link-4#intro-screen) redesign. --- **searchScreenTitle: removed** -No longer applicable due to [Search screen](https://argyle.com/docs/products/link-4#search-screen) changes. +Became redundant due to [Search screen](https://argyle.com/docs/products/link-4#search-screen) redesign. --- **searchScreenSubtitle: removed** -No longer applicable due to [Search screen](https://argyle.com/docs/products/link-4#search-screen) changes. +Became redundant due to [Search screen](https://argyle.com/docs/products/link-4#search-screen) redesign. --- **dataPartners: removed** From 700b87254da5a9b595ad7af6b723a409a558e471 Mon Sep 17 00:00:00 2001 From: Dalia Masilionyte Date: Thu, 7 Apr 2022 18:31:38 +0300 Subject: [PATCH 9/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e6fe2f4..452e14b 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ dependencies { 3. Copy your Sandbox or Production Link API Key for use in the next step ### 2. Utilize user tokens -For successful implementation you need to make sure to utilize user tokens correctly. Learn how to do it in Argyle [returning user experience guide](https://argyle.com/docs/products/returning-users-experience#suggested-flow-for-user-token-usage) before continuing onto the next step. +For successful implementation you need to make sure to utilize user tokens correctly. Learn how to do it in Argyle [returning user experience guide](https://argyle.com/docs/products/returning-users-experience) before continuing onto the next step. ### 3. Integrate Link See [Example](https://github.com/argyle-systems/argyle-link-android/blob/master/app/src/main/java/com/argyleexample/MainActivity.kt) for sample implementation.