I am trying to integrate push notification in my standalone app. I am getting error message as **getdevicepushtokenasync() exists in module exponent notifications but only one callback may be registered to a function in a native module**
. I need to use SNS. So I need get the devicetoken not the expo token. Can someone help me to figure-out the issue.
const { status: existingStatus } = await Permissions.getAsync(
Permissions.NOTIFICATIONS
);
let finalStatus = existingStatus;
if (finalStatus !== “granted”) {
return;
}
const [expoToken, deviceToken] = await Promise.all([
Notifications.getExpoPushTokenAsync(),
Notifications.getDevicePushTokenAsync({ gcmSenderId: “ID” })
]);