Background notification support for expo notifation service api
Steve Moretz
Expo sdk 42 brought a very popular feature but no good examples are available,
the “content-available” flag ...
This flag must be added, but can we pass it to the expo notification service api? Or do we have to use apns and fcm directly?
I don't think it's really that hard to let set this key value along with others :)
Please add this little feature to expo notification service api.
t
trajano
Its sort of doable just don't send the title and body and handle the display yourself https://stackoverflow.com/questions/45971267/are-silent-expo-push-notifications-possible/77582979#77582979
Nathan Tew
If anyone runs into this issue on iOS, here is a workaround:
I found the solution in this github thread (https://github.com/expo/expo/issues/13767#issuecomment-1373174797), basically you need to include
_contentAvailable: true
in your notification payload to expo push notification's service: Example payload for ios:
{ to: <push_token>, "_contentAvailable": true}
Sajjad Hashemi
+1!
I
Ian L.
I was really surprised that this isn't supported. +1
John Johansen
Any updates in 2023 ?
Pierre Saikali
+1! Would be very useful to send this parameter via the Expo Push Notification API.
Kevin Davis
Very interested in this. Are we sure it's not possible send messages the expo service won't pass along as the
content-available
flag?Reading through here : https://docs.expo.dev/push-notifications/sending-notifications/#message-request-format it doesn't look like there is anything documented.
Steve Moretz
Kevin Davis: Not really sure, but you could try and report the results here I wrote this based on documentation not testing.
Kevin Hylant
Yes please! Would love to just use the expo notification API and not each APNs & FCM. Thank you in advance!
Philipp Reiter
we need this! would be amazing if it could be added
Atmas Apps
+1 to add support for background notifications via /push API, specifically by having the expo push service allow for "content-available" to be specified somehow either directly or indirectly.
If it's easier, just having an "aps" dictionary pass through would work. Then we could access any combination of features supported in the documentation:
Load More
→