Integration with Stream
Confused about "Integration with Stream"?
Let us know how we can improve our documentation:
react-native-push-notifications, we provide a platform agnostic experience while still using native push on either iOS or Android platforms.
All that's left: integrating the test app with the Stream Chat client. Open up
App.js in the root of your project and check that
componentDidMount exists. If the file does not exist add an
async componentDidMount method to the class:
For the sake of this tutorial, we created a
.env file to store these values and grab them using react-native-dotenv as shown above – a good idea for your
API_KEY in any case, but your
USER_TOKEN will likely come from elsewhere in a real-world setting, depending on your use-case.
All that's left to do is to use the stream-cli to send out a test push notification. You can find out how that works in this section of the docs. Just make sure you use the same
user_id in both the cli and this test app.