Skip to content

Commit

Permalink
Update example for SDK 0.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
NiallSmyth committed Mar 12, 2024
1 parent ce95b29 commit d738e5d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Android app.
Add the following line to your app's build.gradle file:

```kotlin
implementation("com.moneykit:connect:0.0.7")
implementation("com.moneykit:connect:0.0.8")
```

## Documentation
Expand Down Expand Up @@ -51,7 +51,11 @@ val configuration = MkConfiguration(
}
}
},
onExit = {
onExit = { error ->
if (error != null) {
Timber.e(error.displayedMessage)
}

Timber.i("Exited Link")
},
)
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ android {
}

dependencies {
implementation("com.moneykit:connect:0.0.6")
implementation("com.moneykit:connect:0.0.8")
implementation("com.jakewharton.timber:timber:5.0.1")

implementation("androidx.core:core-ktx:1.12.0")
Expand Down
13 changes: 7 additions & 6 deletions app/src/main/java/com/moneykit/example/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,18 @@ class MainActivity : Activity() {
}
}
},
onExit = {
// Handle MoneyKit being exited
onExit = { error ->
if (error != null) {
// Optional, log errors for your own tracing
Timber.e(error.displayedMessage)
}

// Handle MoneyKit being exited, if you need to reset UI etc.
},
onEvent = { event ->
// Optional, log events for your own tracing
Timber.i(event.name)
},
onError = { error ->
// Optional, log errors for your own tracing
Timber.e(error.displayedMessage)
}
)

return MkLinkHandler(configuration).also { linkHandler = it }
Expand Down

0 comments on commit d738e5d

Please sign in to comment.