I want to implement push notifications for both Android and iOS in my React Native app using Amity SDK.
I first generate the Firebase token in my app and send it to the Amity server using the following function:
const payload = {
deviceId: deviceId,
platform: platform === ‘ios’ ? ‘ios’ : ‘android’,
token: fcmToken,
userId: userId,
provider: ‘fcm’,
};
const response = await fetch(‘https://apix.us.amity.co/v1/notification’, {
method: ‘POST’,
headers: {
‘Content-Type’: ‘application/json’,
},
body: JSON.stringify(payload),
});
I’ve also uploaded the notification certificates for both platforms in the Amity Notification settings.
However, I’m not receiving any notifications when a user starts a live stream (or in similar cases).
Can someone please confirm if there are additional steps or configurations required to make notifications work with Amity on both Android and iOS?