Skip to content

Conversation

@lposen
Copy link
Contributor

@lposen lposen commented Oct 7, 2025

🔹 JIRA Ticket(s) if any

✏️ Description

Configure android for jwt

Instructions

  • pull the branch
  • run the following:
     cd example/android
     rm -rf .gradle build app/build app/.cxx
     ./gradlew clean
  • in a separate tab, run the following:
     cd example
     watchman watch-del-all
     yarn start --reset-cache
  • build the code, either through xcode or by running yarn android
  • try login -- that should be successful
  • logout (you can find the button in the User tab)
  • Open example/src/hooks/useIterableApp.tsx
  • Uncomment the code block that starts with config.authHandler = () => {
  • Refresh the app (you can do this by focusing on the terminal in which you ran yarn start, then pressing r)
  • Try login again -- an error should pop up with the failure reason

@lposen lposen changed the base branch from master to jwt/MOB-10946-task-2-authfailure-and-retrypolicy-ts-classes October 7, 2025 04:47
…sses' into jwt/MOB-10947-task-3-android-retrypolicy-config-at-android-br
@qltysh
Copy link

qltysh bot commented Oct 7, 2025

1 new issue

Tool Category Rule Count
qlty Structure Function with many returns (count = 8): IterableAppProvider 1

This is from Qlty Cloud, the successor to Code Climate Quality. Learn more.

@github-actions
Copy link

github-actions bot commented Oct 7, 2025

Lines Statements Branches Functions
Coverage: 48%
48.2% (228/473) 22.58% (42/186) 41.87% (67/160)

lposen and others added 4 commits October 6, 2025 21:50
…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
@qltysh
Copy link

qltysh bot commented Oct 9, 2025

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
Path File Coverage Δ Indirect
src/inbox/components/IterableInboxMessageList.tsx -1.5
🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

This is from Qlty Cloud, the successor to Code Climate Quality. Learn more.

@lposen lposen marked this pull request as ready for review October 10, 2025 19:52
lposen and others added 3 commits October 10, 2025 12:52
…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
@lposen lposen changed the title [MOB-10947] task 3 android retrypolicy config at android br [MOB-10947][SDK-88] Configure new auth for android Oct 13, 2025
@lposen lposen changed the title [MOB-10947][SDK-88] Configure new auth for android [MOB-10947][SDK-88] Configure JWT for Android Oct 14, 2025
@lposen lposen added the jwt label Oct 14, 2025
…sses' into jwt/MOB-10947-task-3-android-retrypolicy-config-at-android-br
Copy link
Member

@Ayyanchira Ayyanchira left a 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
Copy link
Member

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

Copy link
Contributor Author

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.

Comment on lines +221 to +230
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));
Copy link
Member

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!

Copy link
Contributor Author

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 🥇

Comment on lines 582 to 603
@Override
public void onTokenRegistrationFailed(Throwable object) {
Copy link
Member

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?

@lposen lposen mentioned this pull request Oct 14, 2025
Base automatically changed from jwt/MOB-10946-task-2-authfailure-and-retrypolicy-ts-classes to jwt/master October 14, 2025 20:51
Copy link
Member

@Ayyanchira Ayyanchira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lposen lposen merged commit 5fa3361 into jwt/master Oct 14, 2025
5 of 8 checks passed
@lposen lposen deleted the jwt/MOB-10947-task-3-android-retrypolicy-config-at-android-br branch October 14, 2025 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants