-
Notifications
You must be signed in to change notification settings - Fork 61
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
Expose setPushToken method to react-native lib #10
base: master
Are you sure you want to change the base?
Expose setPushToken method to react-native lib #10
Conversation
Couple of things:
|
Will update the doc link.
In a case where you are developing react-native apps which have multiple push sdk (or) you want to refresh the token manually, we won't have to use a native bridge to execute |
That's reasonable. I will discuss this change with Product. |
This allows the react-native consumer to set the token dynamically which is useful when it has multiple push sdk or consumer refresh token regularly
Hello, another reason here is if you are supporting only single device sign on. It means that customer can have our application on multiple devices but is able to sign in only to one of them (last one), each time needs to do device rebinding. In this scenario we need to invalidate old token because customer may not uninstall application from old device. If we have no way to set device key / delete it from cloud then what happens is that when we send push notification it will arrive on all devices instead of last one. I would hope if we could call setTokenDevice(null) it would deregister the old device token |
@billmote is there any ETA to have this PR merged? I am working in a project for a client who are using SFMC and MobilePush, we really need this setPushToken feature from RN. Since the library doesn't have RN event listener for receive Push Notification info in react native, we supposed to use another 3rd party library, while using that library for receive PN in react native, we need to set the push token from react native. Please consider this is an important request. Thanks. |
@vincent-paing can you please resolve the conflicts? |
In one of my particular use-case, we refresh the token dynamically (expire and refresh token) from react native side of our app. We currently do this by having our own custom react native bridge to call respective function in native sdk. I was thinking it would be nice to have this function exposed by the library itself so others with similar use case con consume the API easily.
I also believe this adds make it easy for those using multiple push sdk in the app.
setPushToken