Skip to content

Commit 231c0cb

Browse files
committed
[MOB-4692] - Override authHandler's new methods
Android SDK has added functionality to trigger onSuccess and onFailure callbacks. Because RN SDK’s internal Java methods implement AuthHandler, it needs to implement the additional methods as well. This will prevent any build errors also prepare for RN’s version of authHandler success and failure callbacks to be implemented next.
1 parent 12b1a46 commit 231c0cb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

android/src/main/java/com/iterable/reactnative/RNIterableAPIModule.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,18 @@ public String onAuthTokenRequested() {
588588
}
589589
}
590590

591+
@Override
592+
public void onTokenRegistrationSuccessful(String authToken) {
593+
IterableLogger.v(TAG, "authToken successfully set");
594+
//TODO: Pass successhandler to event listener
595+
}
596+
597+
@Override
598+
public void onTokenRegistrationFailed(Throwable object) {
599+
IterableLogger.v(TAG, "Failed to set authToken");
600+
//TODO: Pass failureObject to event listener
601+
}
602+
591603
@ReactMethod
592604
public void addListener(String eventName) {
593605
// Keep: Required for RN built in Event Emitter Calls.

0 commit comments

Comments
 (0)