Skip to content
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

Token Registration issue after Braze SDK update #35

Open
abdulbasitaym opened this issue Aug 29, 2022 · 2 comments
Open

Token Registration issue after Braze SDK update #35

abdulbasitaym opened this issue Aug 29, 2022 · 2 comments

Comments

@abdulbasitaym
Copy link

abdulbasitaym commented Aug 29, 2022

Hello there.
After updating appboy-segment bundled SDK to v13.0.0 with android 13 changes from braze, we are facing an issue in FCM token registration for the first time. On detailed debugging and analysis we find out that this method onNewToken in BrazeFirebaseMessagingService is not invoked for the very first time (in some cases it's not getting invoked even after the first time). Although this method should invoke whenever there's a new token and because that token is not getting registered on Braze that results in no push notifications getting received by the end-user and the user have to kill the app and restart the session multiple times to receive a push notification that is not a good user experience.
It would be super helpful if you guys can look into this issue on top priority.

PS. I have also updated SDK to 14.0.0 but still facing the same issue.

Proposed changes: To resolve this issue, we are setting the FCM token by explicitly calling this method setRegisteredPushToken. Please let me know your thoughts on this resolution. For getting FCM token we are using Firebase BoM with version 28.3.0 for messaging SDK.

Code snippet:

FirebaseMessaging.getInstance().getToken().addOnCompleteListener(task -> {
   if (task.isSuccessful()) {
      braze.setRegisteredPushToken(task.getResult());
   }
});
@radixdev
Copy link
Collaborator

Can you share verbose logs and your configuration (braze.xml or BrazeConfig)?

@abdulbasitaym
Copy link
Author

abdulbasitaym commented Aug 30, 2022

Hello,
Please find the config and logs below. Please note logs are filtered out using braze keyword by enabling logs as mentioned in the above link.
Note: After doing some code changes push notifications started getting received with the below code snippet.
Logs are before the code changes where we are not able to receive push.

Screenshot 2022-08-30 at 1 45 30 PM

braze-filtered-logs.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants