React Native Module that interacts with the Esper SDK
npm install react-native-esper-sdk
- In your android level build.gradle, add the following line to the repositories:
maven { url "https://artifact.esper.io/artifactory/esper-device-sdk/" }
- Afterwards, add the following dependencies to the build.gradle inside
android/app
folder:// Provide the Esper SDK implementation 'io.esper.devicesdk:app:2.1.6510.20' implementation 'androidx.annotation:annotation:1.1.0'
- Finnaly, for android 11, add the following code to AndroidManifest.xml:
<queries> <package android:name="io.shoonya.shoonyadpc"/> </queries>
You can also check the Esper SDK documentation for a detailed explanation of the changes needed.
import { checkSDKActivation, getDeviceId, getSerialNumber, getDeviceUUID } from "react-native-esper-sdk";
// ...
const isActive = await checkSDKActivation(accessToken);
console.log("Esper SDK isActive:", isActive);
if (isActive) {
const esperDeviceId = await getDeviceId();
if (esperDeviceId != null) {
console.log("Got esperDeviceId:", esperDeviceId);
}
const serialNumber = await getSerialNumber();
if (serialNumber != null) {
console.log("Got serialNumber:", serialNumber);
}
const uuid = await getDeviceUUID();
if (uuid != null) {
console.log("Got UUID:", uuid);
}
}
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT