React Native SDK
Learn how to use our Expo React Native SDK. It allows you to capture certain device signals (both in Android and iOS) that will be reported back to Prelude.
This SDK is currently in closed beta testing phase. Please contact us to get a SDK key to be able to start using it.
This guide is a work in progress. If you have any questions, please reach out.
The React Native Expo SDK
The React Native Expo SDK is published in GitHub at https://github.com/prelude-so/react-native-sdk .
Using the Expo React Native SDK
The Expo React Native SDK allows you to capture certain device signals (both in Android and iOS) that will be reported back to Prelude.
It is provided as an Expo module that you can integrate into your React Native Expo Application.
The Android minSdkVersion
value in the SDK is set to 26 (Android 8.0). If you application has a lower value you may need to update it.
Configuring the project
First install the SDK dependency in your app:
Then, where ever in your application you want to report the device signals you can use code like this:
Then run the Expo application normally (in your application's directory):
or
Once you get the dispatch ID through the event, you can report it back to your own API to be forwarded in subsequent network calls.
There is no restriction on when to call this API, you just need to take this action before you need to report back the dispatch ID. It is advisable to make the request early on during the user onboarding process to have the dispatch id available when required.