I'm trying to send a notification using cloud functions to android devices,
It's received well but without default notification sound it's silent.
although in sendToDevice
option I send it like this
sound: 'default',
Code snippet
// Send notification for provider when his order is cancelled removed!exports.userCancelOrder = functions.database .ref('/Providers/ProvidersOrders/InProgress/{providerUid}/{orderId}') .onUpdate(async (snapshot, context) => { const orderdata = snapshot.before.val(); const {username} = orderdata; const {providerUid} = context.params; const userRef = await admin .database() .ref(`/Providers/users/${providerUid}`) .once('value'); console.log('userRef', userRef.val()); const {userToken} = userRef.val(); // FCM user app token const providerName = userRef.val().name; try { const options = { priority: 'high', contentAvailable: true, // NOT content_available: true }; const payload = { notification: { body: `hey, ${providerName}, your order canclled by ${username} :) `, timestamp: Date.now().toString(), isRead: 'false', sound: 'default', // here's }, }; let {sound, ...notification} = payload.notification; let uid = providerUid; await admin .messaging() .sendToDevice(userToken, payload, options) .then(() => { return admin .database() .ref(`Notifications/${uid}`) .push({...notification}); }); console.log('message sent'); } catch (error) { console.log('Error sending message:', error); } return null; });