Skip to content

Commit 5f80832

Browse files
authored
Merge pull request #91 from xendit/fix/cc-6939-add-unregisterAllBroadcast
[CC-6939] Add method unregisterAllBroadcastReceiver
2 parents ad46912 + 0a71be5 commit 5f80832

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

xendit-android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apply plugin: 'maven-publish'
33
apply plugin: 'com.jfrog.bintray'
44

55
group 'com.xendit'
6-
version '3.6.2'
6+
version '3.6.3'
77

88
ext {
99
bintrayOrg = 'xendit'

xendit-android/src/main/java/com/xendit/Xendit.java

+14
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,20 @@ public void onFailure(NetworkError error) {
709709
}));
710710
}
711711

712+
public void unregisterAllBroadcastReceiver() {
713+
if (authenticationBroadcastReceiver != null) {
714+
context.unregisterReceiver(authenticationBroadcastReceiver);
715+
}
716+
717+
if (tokenBroadcastReceiver != null) {
718+
context.unregisterReceiver(tokenBroadcastReceiver);
719+
}
720+
721+
if (authenticatedTokenBroadcastReceiver != null) {
722+
context.unregisterReceiver(authenticatedTokenBroadcastReceiver);
723+
}
724+
}
725+
712726
private void registerBroadcastReceiver(final AuthenticationCallback authenticationCallback) {
713727
new Handler(Looper.getMainLooper()).post(new Runnable() {
714728
@Override

0 commit comments

Comments
 (0)