Skip to content

Commit 2874900

Browse files
authored
Merge pull request #182 from finbox-in/feature/add-mode-android
feature/add-mode-android
2 parents df699b1 + 06c6973 commit 2874900

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

docs/bank-connect/android.md

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# BankConnect: Android
2+
23
The Android SDK helps user submits their bank statements via upload or net banking credentials in your Android application.
34

45
## Requirements
@@ -71,6 +72,7 @@ dependencies {
7172
</CodeSwitcher>
7273

7374
## Adding Dependency
75+
7476
In the project level `build.gradle` file, add the repository URLs to all `allprojects` block.
7577

7678
<CodeSwitcher :languages="{kotlin:'Kotlin',groovy:'Groovy'}">
@@ -131,27 +133,30 @@ implementation('in.finbox.bankconnect:hybrid:<BC_SDK_VERSION>:release@aar') {
131133
</template>
132134
</CodeSwitcher>
133135

134-
135136
::: warning NOTE
136137
Following will be shared by FinBox team at the time of integration:
138+
137139
- `ACCESS_KEY`
138140
- `SECRET_KEY`
139141
- `BC_SDK_VERSION`
140142
- `CLIENT_API_KEY`
141143
:::
142144

143145
## Integration Workflow
146+
144147
The diagram below illustrates the integration workflow in a nutshell:
145148
<img src="/client_sdk.jpg" alt="Client SDK Workflow" />
146149

147150
## Sample Project
151+
148152
We have hosted a sample project on GitHub, you can check it out here:
149153
<div class="button_holder">
150154
<a class="download_button" target="_blank" href="https://github.com/finbox-in/bankconnect-android">Open GitHub Repository</a>
151155
</div>
152156

153157
## Build Bank Connect
154-
Build the `FinBoxBankConnect` object by passing `apiKey`, `linkId`, `fromDate`, `toDate` and `bank`.
158+
159+
Build the `FinBoxBankConnect` object by passing `apiKey`, `linkId`, `fromDate`, `toDate`, `bank` and `mode`.
155160

156161
<CodeSwitcher :languages="{kotlin:'Kotlin',java:'Java'}">
157162
<template v-slot:kotlin>
@@ -162,7 +167,8 @@ FinBoxBankConnect.Builder(applicationContext)
162167
.linkId("your_link_id")
163168
.fromDate("01/01/2021") // Optional: Default 6 months old date
164169
.toDate("01/04/2021") // Optional: Default value 1 day less than current date
165-
.bank("sbi") // Optional
170+
.bank("sbi") // Optional: Short code of the bank
171+
.mode(PDF) // Optional: PDF Mode
166172
.build()
167173
```
168174

@@ -175,27 +181,29 @@ new FinBoxBankConnect.Builder(getApplicationContext())
175181
.linkId("your_link_id")
176182
.fromDate("01/01/2021") // Optional: Default 6 months old date
177183
.toDate("01/04/2021") // Optional: Default value 1 day less than current date
178-
.bank("sbi") // Optional
184+
.bank("sbi") // Optional: Short code of the bank
185+
.mode(PDF) // Optional: PDF Mode
179186
.build();
180187
```
181188

182189
</template>
183190
</CodeSwitcher>
184191

185-
186192
| Builder Property | Description | Required |
187193
| - | - | - |
188194
| `apiKey` | specifies the `api_key` | Yes |
189195
| `linkId` | specifies the `link_id` | Yes |
190196
| `fromDate` | specifies the starting period of the statement in `DD/MM/YYYY`format | No |
191197
| `toDate` | specifies the end period of the statement in `DD/MM/YYYY` format | No |
192198
| `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 |
199+
| `mode` | set the mode as pdf (manual upload) or aa (Account Aggregator) or online (Net Banking) | No |
193200

194201
`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.
195202

196203
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.
197204

198205
::: warning Minimal Requirements for SDK to work:
206+
199207
1. `apiKey` is is mandatory
200208
2. `linkId` is mandatory, and should be at least 8 characters long
201209
3. In case `fromDate` / `toDate` is provided, make sure they are of correct date format: `DD/MM/YYYY`.
@@ -205,6 +213,7 @@ Once all these conditions are met, the BankConnect object will build.
205213
:::
206214

207215
## Show SDK Screen
216+
208217
Start BankActivity and listten for the result
209218

210219
<CodeSwitcher :languages="{kotlin:'Kotlin',java:'Java'}">
@@ -245,11 +254,13 @@ result.launch(new Intent(this, BankActivity.class));
245254
</CodeSwitcher>
246255

247256
## Parse Results
257+
248258
Once the user navigates through the banks and uploads the bank statement, the sdk automatically closes `BankActivity` and returns `FinboxOnSuccessPayload`.
249259

250260
`FinboxOnSuccessPayload` contains `linkId` and `entityId`. A successful upload contains a unique `entityId`.
251-
* linkId - Unique id passed when building the Bank Connect object
252-
* entityId - Unique id of a successful statement upload
261+
262+
- linkId - Unique id passed when building the Bank Connect object
263+
- entityId - Unique id of a successful statement upload
253264

254265
<CodeSwitcher :languages="{kotlin:'Kotlin',java:'Java'}">
255266
<template v-slot:kotlin>
@@ -309,29 +320,30 @@ if (result != null && result.getResultCode() == Activity.RESULT_OK) {
309320
</template>
310321
</CodeSwitcher>
311322

312-
313323
:::warning Webhook
314324
To track detailed errors, and transaction process completion at the server-side, it is recommended to also integrate [Webhook](/bank-connect/webhook.html).
315325
:::
316326

317327
## Customization
328+
318329
`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.
319330

320331
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
321-
```xml
332+
333+
```xml
322334
<style name="BankConnectTheme.Toolbar">
323335
<item name="android:background">@color/colorWhite</item>
324336
</style>
325-
```
337+
```
326338

327339
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.
328340

329-
```xml
341+
```xml
330342
<style name="BankConnectTheme" parent="AppTheme">
331343

332344
</style>
333345

334346
<style name="BankConnectTheme.AppBarOverlay" parent="AppTheme.AppBarOverlay" />
335347

336348
<style name="BankConnectTheme.PopupOverLay" parent="AppTheme.PopupOverlay" />
337-
```
349+
```

docs/bank-connect/flutter.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -109,21 +109,8 @@ We have hosted a sample project on GitHub, you can check it out here:
109109

110110
## Show SDK Screen
111111

112-
Initialize the `FinBoxBcPlugin` in Kotlin Application class
113-
114-
```kotlin
115-
class MainApp:FlutterApplication() {
116-
override fun onCreate() {
117-
super.onCreate()
118-
FinBoxBcPlugin.initLibrary(this)
119-
}
120-
}
121-
```
122-
123-
Initialize the `FinBoxBcPlugin` in dart file
124-
125112
```dart
126-
FinBoxBcPlugin.initSdk("CLIENT_API_KEY","FROM_DATE","TO_DATE","BANK_NAME");
113+
FinBoxBcPlugin.initSdk("CLIENT_API_KEY","FROM_DATE","TO_DATE","BANK_NAME","MODE");
127114
```
128115

129116
| Builder Property | Description | Required |
@@ -133,6 +120,7 @@ FinBoxBcPlugin.initSdk("CLIENT_API_KEY","FROM_DATE","TO_DATE","BANK_NAME");
133120
| `fromDate` | specifies the starting period of the statement in `DD/MM/YYYY`format | No |
134121
| `toDate` | specifies the end period of the statement in `DD/MM/YYYY` format | No |
135122
| `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 |
123+
| `mode` | set the mode as pdf (manual upload) or aa (Account Aggregator) or online (Net Banking) | No |
136124

137125
`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.
138126

0 commit comments

Comments
 (0)