-
Notifications
You must be signed in to change notification settings - Fork 39
[MOB-10947][SDK-88] Configure JWT for Android #727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MOB-10947][SDK-88] Configure JWT for Android #727
Conversation
… RNIterableAPIModule
…AppMessage.getMessageId()
…sses' into jwt/MOB-10947-task-3-android-retrypolicy-config-at-android-br
…sses' into jwt/MOB-10947-task-3-android-retrypolicy-config-at-android-br
…sses' into jwt/MOB-10947-task-3-android-retrypolicy-config-at-android-br
1 new issue
This is from Qlty Cloud, the successor to Code Climate Quality. Learn more. |
…sses' into jwt/MOB-10947-task-3-android-retrypolicy-config-at-android-br
…sses' into jwt/MOB-10947-task-3-android-retrypolicy-config-at-android-br
…sses' into jwt/MOB-10947-task-3-android-retrypolicy-config-at-android-br
|
Diff Coverage: The code coverage on the diff in this pull request is 0.0%. Total Coverage: This PR will decrease coverage by 0.53%. File Coverage Changes
🛟 Help
This is from Qlty Cloud, the successor to Code Climate Quality. Learn more. |
…sses' into jwt/MOB-10947-task-3-android-retrypolicy-config-at-android-br
…sses' into jwt/MOB-10947-task-3-android-retrypolicy-config-at-android-br
…sses' into jwt/MOB-10947-task-3-android-retrypolicy-config-at-android-br
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made some nit pick and small change comments
| ): Array<IterableInboxImpressionRowInfo> { | ||
| return viewTokens.map(function (viewToken) { | ||
| const inAppMessage = IterableInAppMessage.fromViewToken(viewToken); | ||
| return viewTokens |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what viewToken is. Is it limited to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's given by the onViewableItemsChanged callback from FlatList, a react-native component used later. The callback just shows what rows are in view.
At times, item was not defined for some reason... hence the fix.
| if (iterableContextJSON.has("retryPolicy")) { | ||
| JSONObject retryPolicyJson = iterableContextJSON.getJSONObject("retryPolicy"); | ||
| int maxRetry = retryPolicyJson.getInt("maxRetry"); | ||
| long retryInterval = retryPolicyJson.getLong("retryInterval"); | ||
| String retryBackoff = retryPolicyJson.getString("retryBackoff"); | ||
| RetryPolicy.Type retryPolicyType = RetryPolicy.Type.LINEAR; | ||
| if (retryBackoff.equals("EXPONENTIAL")) { | ||
| retryPolicyType = RetryPolicy.Type.EXPONENTIAL; | ||
| } | ||
| configBuilder.setAuthRetryPolicy(new RetryPolicy(maxRetry, retryInterval, retryPolicyType)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to see RetryPolicy coming all the way from TS and getting applied at core level!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was all you from the previous work we did 🥇
| @Override | ||
| public void onTokenRegistrationFailed(Throwable object) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we delete this method altogether as its replaced by onAuthFailure now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
🔹 JIRA Ticket(s) if any
✏️ Description
Configure android for jwt
Instructions
cd example/android rm -rf .gradle build app/build app/.cxx ./gradlew cleancd example watchman watch-del-all yarn start --reset-cacheyarn androidconfig.authHandler = () => {yarn start, then pressing r)