Comments (7)
hey, great question, it's something on our roadmap to make the integration with Notifee easier and more accessible for all configurations.
One concern is if the notification is made without Notifee it could cause issues when the event is returned in js-land.
Have you considered using NotifeeExtensionHelper
(docs)?
from notifee.
Hello @helenaford, we already use a Notification Extensions in our app (not the Notifee one) (the notification extension is written in swift though) what's not clear to me is what the NotifeeExtensionHelper actually does behind the scenes, and how it solves the problem of delivering a remote notification through Notifee, and if there are other ways to do so without altering the notification payload.
Another question is: If I were to use the the NotifeeExtensionHelper, do I still need to install and configure Firebase for my iOS app in order to receive remote notifications via Notifee or will everything be handled by Notifee (except getting the remote notification token)?
Thank you for your patience
from notifee.
@lucadegasperi ah ok, yeah we don't support swift 🤔 . The helper parses the payload so it can be handled by the library.
If you're not doing anything custom in your extension, I'd suggest recreating your app's Notification Service Extension in Objective-C and using the helper.
The helper does not depend on firebase, so any remote notification that contains the apns key notifee_options
will work.
apns: {
payload: {
aps: {
'content-available': 1, // Important, to receive `onMessage` event in the foreground when message is incoming
'mutable-content': 1, // Important, without this the extension won't fire
},
notifee_options: {
image: 'https://placeimg.com/640/480/any', // URL to pointing to a remote image
ios: {
sound: 'media/kick.wav', // A local sound file you have inside your app's bundle
categoryId: 'post', // A category that's already been created by your app
... // any other api properties for NotificationIOS
},
},
},
},
The helper will access notifee_options
via userInfo:
self.bestAttemptContent.userInfo[@"notifee_options"]
from notifee.
@lucadegasperi to respond to your question around "if there are other ways to do so without altering the notification payload.", this is something we could look into. But it would require adding a flag somewhere to let notifee
know you'd like us to handle the events. I've marked the issue as an enhancement for this reason. Hope that answers your question 😅
from notifee.
Thanks Again @helenaford. Just to make sure I understand things correctly, can the notifee_options
be an empty object, or are the parameters like categoryId
required, despite having them already defined at the top level of the notification?
from notifee.
yeah, it will need to be in notifee_options.ios
from notifee.
Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.
from notifee.
Related Issues (20)
- Feature Request/Enhancement - Interval trigger with custom timestamp HOT 3
- React Native: Issue with Daily Triggered Notifications Not Firing Properly HOT 1
- NullPointerException: Attempt to invoke virtual method 'void android.view.View.dispatchCancelPendingInputEvents() HOT 1
- Notification type, Property 'ab_cat' does not exist on type HOT 1
- 26-second mp3 file when used for "sound" property in trigger is played by iOS 17 only for 5 seconds HOT 1
- [Android] Handle onBackgroundEvent navigation and API call HOT 2
- [Android] Small Icon not working correctly in release build HOT 1
- Add image message support in Android MessagingStyle
- Getting only one notification even I send multiple messages. HOT 1
- Could not find any matches for app.notifee:core:+ as no versions of app.notifee:core are available. HOT 6
- onBackgroundEvent no longer works in App.js HOT 1
- [iOS] onBackgroundEvent EventType Press, Dismissed or Delivered doesn't work HOT 2
- New architecture support?
- Foreground service freezes when app dismissed
- Android Build Failure When Locking Dependencies `Could not resolve app.notifee:core:+.`
- Add in additional code examples for onBackgroundEffect
- Notifee does not support extra params from Android intent back to JS
- [Android] onForegroundEvent doesn't work with React-native 0.74.5 ( sdk target 34) HOT 1
- onBackgroundEvent not working with Trigger notifications
- iOS: Quick actions not working when app is killed due to onBackgroundEvent() not triggering
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from notifee.