Comments (4)
Hi @moustafadevrn, in our Example app (included within the SDK), HomeScreen.js file, function HomeScreen, block code of useEffect, I added the following:
mobileMessaging.subscribe( 'messageReceived', eventData => { console.log('Event received', eventData); } );
Then I triggered a notification through chat message, broadcasted a regular push, and also a In-App push through Moments, and all three printed the 'Event received' and its content on my real iOS device, even with the app in background. I don't know what the issue in your end is, could you please retry with our Example app perhaps?
from mobile-messaging-react-native-plugin.
Hello @fortesdev
Thank you for your suggestion. I actually tried the same line of code you mentioned. However, the event is not triggered as you suggested.
As I mentioned before, the notification is not received while the app is in the foreground.
Furthermore, I have searched for the code block you mentioned in the HomeScreen.js file located in the Example folder of the SDK, but I couldn't find any code like that.
from mobile-messaging-react-native-plugin.
Hi @moustafadevrn,
I wrote that "I added" that line of code (that you can write as well, not to search for it), in line 11 here.
And it works on my testing:
App in foreground, broadcasting regular push => event received (notification not visible as it is silent)
App in foreground, chat message received, but chat not present => event received (notification visible)
App in foreground, chat message received, but chat present => event and notification not received by design, as explained here.
If you still face issues, feel free to check/share [MobileMessaging] console logs (excluding your ids/secrets), but also test with our Example if possible.
from mobile-messaging-react-native-plugin.
I'll close the issue due to inactivity, feel free to reopen it if needed.
from mobile-messaging-react-native-plugin.
Related Issues (20)
- Runtime Crash on Android Prod Releases HOT 12
- Runtime exception for Android OS v12+ HOT 24
- The following build commands failed: HOT 1
- Does infobip/mobile-messaging-react-native-plugin supports react-native 0.70 version? HOT 5
- Crash issue on SDK version 7.0.3 & 8.0.0 HOT 7
- Cannot receive tapped notification event when app is closed HOT 5
- Pods completion on Xcode15 HOT 7
- Uninstall events are not being recorded HOT 4
- Every time an user installs an app update, a new installation is registered in his profile. HOT 2
- Push notifications conflicts HOT 2
- hide notification in foreground HOT 2
- [ITMS-91053: Missing API declaration] Apple issue review HOT 4
- Push Notification on iOS Devices Not Received HOT 1
- Deep Link Handling in Notifications HOT 13
- Combining Push Notifications with In-App Notifications HOT 4
- Chat Widget Notification Crashing Android App HOT 3
- Build iOS fail HOT 2
- Notification Delivery Issue on Android 13+ with Outdated React Native Version HOT 4
- Android hardware back button closes app when SDK installed HOT 1
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 mobile-messaging-react-native-plugin.