I am using react native and trying to add push notification.
My application need push notification because of chatting. I just need push notification to appear whenever the user receives chat message.
I've searched couple of libraries about push notification and found out firebase and react-native-push-notification.
Which one is proper library for this case and please tell me if there is other better way to solve this problem.
We're using invertase firebase notification library which is working so far better without any issues.
You'll get almost all the options which you needed for push notification customization like badges, etc.
Related
I am making a push notification feature using reactnative push notification.
If I create a channel according to the reactnative push notification official statement, I can control it only when I enter the notification category in the application information of the application.
Can I use the reactnative push notifictaion library to control when I create a component within the app like Youtubemusic (below Image) and implement the push setting ON OFF control function? It doesn't seem to be in the official documentation.
I'm trying to implement this feature within the app, but I'm curious about how it's implemented in practice!
i'm not using local notification just remote
Basically, you have 2 way to achieve this: on backend side or on frontend side.
Backend
Send to backend current state of toggle settings inside your app. When backend want to send push to client, it is internally checks state of this toggle and make a decision send or not.
Frontend
All your push notifications must be send as data only and with high priority (contentAvailable: true, priority: 'high').
After that, only mobile app will control showing of push notifications, because data only push not display anything, just trigger mobile app about new message.
So, when your frontend app receive new push message, it check current user settings and make decision display it or not.
I am using push notifications but my requirement is that it will show push notification automatically at 4:00pm, 10:00am but I didn't found any good package for react native so if any body have experience with local notification share with me.
https://github.com/zo0r/react-native-push-notification
u can try scheduled notifications for that.
I'm working on a React Native app where I need to send recurring push notifications at specific times. So for example, the user will toggle the app to remind them to do task X every day at 12:00pm and I want the app to send a push notification at 12:00pm (when the app is in the background) to remind the user to complete task X.
For the React Native app, I'm using expo and I've read up on their documentation; however, I'm not quite sure how to handle these reminders.
a) I don't know how to monitor recurring events, i.e. how can I set up the app to know when it's 12:00pm, especially given that the app will be running in the background or potentially not running at all, and
b) I'm not sure if these push notifications should be sent locally within the app or from the app's API/server.
Ideally, I would like to use expo's push notification feature, but I'm open to any suggestions as to how to get this set up! Thanks.
a. ) You should look into node-cron or node-schedule for scheduled push notifications.
b.) It depends on the situation. If you are performing a complicated reminder, such as running a query to check if the task is completed, and sending a notification if it is not completed, then the scheduled push notifications should be sent remotely from the api/server. Else, you can use the react-native push notification to send a local scheduled notification.
I have been reading the documentation pages for Notifications for Android devices but I want to build and display notifications on an Android-TV. I have used several apps in the AndroidTV and none of them shows notifications, instead sometimes they appear in the recommendations bar,which leads me to believe that it may not be possible to display notifications on this family of devices.
My end goal is to dispatch a Heads-up notification (priority flag set to MAX) so it can be shown regardless of what the user is doing.
Can someone help me to achieve this, maybe pointing me to some more specific docs?
UPDATE I have found this application that displays notifications, but I cannot understand how it works. Is it possible that it is mimicking notifications without working with Android's API?
I also think notification will appear as "recommendation" and not appear as "notification".
For the Notifications for Android TV app, I guess it is using custom designed Toast instead of Notification.
I want to simulate push notification without using apn.
I have tried to HOOK SBSystemLocalNotificationAlert
and use
[objc_getClass("SBSystemLocalNotificationAlert") presentWithLocalNotification:notification application:bundle];
but it is just an alertview not like ios5 notification center, and it looks like ios4's push.
I want to simulate push notification (IOS5) for my daemon like MobileSMS.
sorry for my english
If you want to simulate push notifications without APN service, you can try this library: https://github.com/acoomans/SimulatorRemoteNotifications
Works in the simulator too.
That's a tough issue. I do not know whether it is possible (correct me guys if I am wrong).
However if you only need this for testing, you can use Parse.com for sending push notifications. Their basic service that includes push notification is for free and they deliver a working example code how to integrate.