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

Can i use Klaviyo.INSTANCE.setPushToken(token) in another process #200

Open
2 of 4 tasks
qiaop opened this issue Dec 9, 2024 · 1 comment
Open
2 of 4 tasks

Can i use Klaviyo.INSTANCE.setPushToken(token) in another process #200

qiaop opened this issue Dec 9, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@qiaop
Copy link

qiaop commented Dec 9, 2024

Checklist

  • I have read the contributing guidelines
  • I have determined whether this bug is also reproducible in a vanilla Android project
  • If possible, I've reproduced the issue using the master branch or latest release of this package.
  • This issue hasn't been addressed in an existing GitHub issue or pull request.

Description

My FirebaseMessagingService is in another porocess,an Klaviyo ini in main process.
how can i use Klaviyo.INSTANCE.setPushToken(token) in FirebaseMessagingService onNewToken

Expected behavior

always

Actual behavior

always

Steps to reproduce

always

The Klaviyo Android SDK version information

3.0.0

Device Information

No response

Android Studio Version

No response

Android API Level

No response

@qiaop qiaop added the bug Something isn't working label Dec 9, 2024
@dan-peluso
Copy link
Contributor

Thanks for filing this! While it's definitely recommended that you use the application to encapsulate both your Klaviyo instance and Firebase service, there are some workarounds for messaging between the two. I'd recommend looking into using shared preferences to hold the firebase token, or creating a broadcast between the services that handles the token setting. You definitely don't want to set the token in the separate process, it would be better to set some shared store with the value and have your main process read that. If you do try and set from a different process and get some strange behavior, please feel free to share and I can look into whats going on further with a dummy application or logs.

@dan-peluso dan-peluso self-assigned this Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants