Skip to content

Commit

Permalink
Merge pull request #58 from chargebee/fix/signed_build_app_crash
Browse files Browse the repository at this point in the history
[Fix](App crash with NPE on signed build)
  • Loading branch information
cb-amutha authored Jan 16, 2023
2 parents 9fc466e + bbbe6b5 commit 2c7f78c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The following requirements must be set up before installing Chargebee’s Androi
The `Chargebee-Android` SDK can be installed by adding below dependency to the `build.gradle` file:

```kotlin
implementation 'com.chargebee:chargebee-android:1.0.14'
implementation 'com.chargebee:chargebee-android:1.0.15'
```

## Example project
Expand Down Expand Up @@ -365,7 +365,7 @@ Chargebee is available under the [MIT license](https://opensource.org/licenses/M
To install Chargebee's Android SDK, add the following dependency to the build.gradle file.

```
implementation 'com.chargebee:chargebee-android:1.0.14'
implementation 'com.chargebee:chargebee-android:1.0.15'
```
Example project
---------------
Expand Down
2 changes: 1 addition & 1 deletion chargebee/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0.14"
versionName "1.0.15"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ internal class ResultHandler {
logger: CBLogger? = null
) {
try {
CoroutineScope(Dispatchers.IO).launch {
CoroutineScope(Dispatchers.IO + coroutineExceptionHandler()).launch {
val result: ChargebeeResult<T> = try {
logger?.info()
codeBlock()
Expand All @@ -61,11 +61,11 @@ internal class ResultHandler {
}

}
// private fun coroutineExceptionHandler() : CoroutineExceptionHandler {
// val coroutineExceptionHandler = CoroutineExceptionHandler{_, throwable ->
// print("CoroutineExceptionHandler: ${throwable.message}")
// }
// return coroutineExceptionHandler
// }
private fun coroutineExceptionHandler() : CoroutineExceptionHandler {
val coroutineExceptionHandler = CoroutineExceptionHandler{_, throwable ->
print("CoroutineExceptionHandler : ${throwable.message}")
}
return coroutineExceptionHandler
}
}
}

0 comments on commit 2c7f78c

Please sign in to comment.