You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/session-flow/android.md
+65-32Lines changed: 65 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
1
# BankConnect: Android
2
+
2
3
The Android SDK helps user submits their bank statements via upload or net banking credentials in your Android application.
3
4
4
5
## Requirements
@@ -70,7 +71,7 @@ dependencies {
70
71
</template>
71
72
</CodeSwitcher>
72
73
73
-
## Adding Dependency
74
+
## Add Dependency
74
75
75
76
In the project level `build.gradle` file or `settings.gradle`, add the repository URLs to all `allprojects` block or `repositories` block inside `dependencyResolutionManagement`.
.fromDate("01/01/2021") // Optional: Default 6 months old date
178
-
.toDate("01/04/2021") // Optional: Default value 1 day less than current date
179
-
.bank("sbi") // Optional
186
+
.apiKey("CLIENT_API_KEY")
187
+
.linkId("LINK_ID")
188
+
.fromDate("01/01/2021") // Optional: Default 6 months old date
189
+
.toDate("01/04/2021") // Optional: Default value 1 day less than current date
190
+
.bank("sbi") // Optional: Short code of the bank
191
+
.mode(PDF) // Optional: PDF Mode
192
+
.mobileNumber("9876543210") // Optional: Mobile number
193
+
.journeyMode(MULTI_PDF) // Optional: Multi PDF journey
194
+
.aaJourneyMode(ONLY_RECURRING) // Optional: Recurring AA pulls
195
+
.aaRecurringTenureMonthCount(3) // Optional: Consent duration is valid for 3 months
196
+
.aaRecurringFrequencyUnit(TimeUnit.DAYS) // Optional: Frequency value is in Days
197
+
.aaRecurringFrequencyValue(2) // Optional: Number of times to pull the data
180
198
.build();
181
199
```
182
200
183
201
</template>
184
202
</CodeSwitcher>
185
203
186
-
187
204
| Builder Property | Description | Required |
188
205
| - | - | - |
189
206
|`apiKey`| specifies the `api_key`| Yes |
190
207
|`linkId`| specifies the `link_id`| Yes |
191
208
|`fromDate`| specifies the starting period of the statement in `DD/MM/YYYY`format | No |
192
209
|`toDate`| specifies the end period of the statement in `DD/MM/YYYY` format | No |
193
210
|`bank`| pass the [bank identifier](/bank-connect/appendix.html#bank-identifiers) to skip the bank selection screen and directly open a that bank's screen instead | No |
211
+
|`mode`| set the mode as pdf (manual upload) or aa (Account Aggregator) or online (Net Banking) | No |
212
+
|`mobile_number`| Prefills phone number in Account Aggregator mode | No |
213
+
|`journey_mode`| Optional parameter to set the journey (i.e.multi_pdf or multi_banking) | No |
214
+
|`aa_journey_mode`| set the journey mode for AA (i.e only_once or only_recurring) | No |
215
+
|`aa_recurring_tenure_month_count`| set the recurring consent duration (min: 1 and max: 24) | No |
216
+
|`aa_recurring_frequency_unit`| set the frequency unit to pull the data during the recurring consent duration (year, month, day, hour) | No |
217
+
|`aa_recurring_frequency_value`| set the frequency value to pull the data during the recurring consent duration (min: 1 and max: 3) | No |
194
218
195
219
`fromDate` and `toDate` specify the period for which the statements will be fetched. For example, if you need the last 6 months of statements, `fromDate` will be today's date - 6 months and `toDate` will be today's date - 1 day. If not provided the default date range is 6 months from the current date. It should be in `DD/MM/YYYY` format.
196
220
197
221
Once the above statement is added, a series of checks are done to make sure the SDK is implemented correctly. A `RunTimeException` will be thrown while trying to build the project in case any of the checks are not completed.
198
222
199
223
::: warning Minimal Requirements for SDK to work:
224
+
200
225
1.`apiKey` is is mandatory
201
226
2.`linkId` is mandatory, and should be at least 8 characters long
202
227
3. In case `fromDate` / `toDate` is provided, make sure they are of correct date format: `DD/MM/YYYY`.
@@ -206,7 +231,8 @@ Once all these conditions are met, the BankConnect object will build.
Once the user navigates through the banks and uploads the bank statement, the sdk automatically closes `BankActivity` and returns `FinboxOnSuccessPayload`.
250
275
251
-
`FinboxOnSuccessPayload` contains `linkId` and `entityId`. A successful upload contains a unique `entityId`.
252
-
* linkId - Unique id passed when building the Bank Connect object
253
-
* entityId - Unique id of a successful statement upload
276
+
Once the user navigates through the banks and uploads the bank statement, the sdk automatically closes `BankActivity` and returns `FinBoxPayload`.
277
+
278
+
`FinBoxPayload` contains `linkId` and `entityId` (or `sessionId`). A successful upload contains a unique `entityId` (or `sessionId`).
279
+
280
+
- linkId - Unique id passed when building the Bank Connect object
281
+
- entityId - Unique id of a successful statement upload during Entity flow
282
+
- sessionId - Session id of a successful statement upload during Session flow
To track detailed errors, and transaction process completion at the server-side, it is recommended to also integrate [Webhook](/bank-connect/webhook.html).
316
347
:::
317
348
318
349
## Customization
350
+
319
351
`BankActivity` inherits the themes and color from Material Dark Action Bar Theme. Most of the case, there would be less customization requried but if there is a mismatch in colors, you can customize it through your `styles.xml` file.
320
352
321
353
1. The sdk Toolbar color uses `colorPrimary`. If your app toolbar color is different from `colorPrimary` then change the color by updating the background color
2.`BankConnectTheme` is the base theme of the sdk and it inherits `Theme.MaterialComponents.Light.DarkActionBar`. If your app doesn't inherit Dark Action Bar theme then you can change the sdk theme to inherit your app base theme.
0 commit comments