I'm building an app with React Native and handling local notifications with https://github.com/zo0r/react-native-push-notification
The problem is, When I research about scheduling local notifications, I believe there is a limit for that. My applications purpose is about sending notifications so I need to send 10-15 of them in a day. What is the best practice for that with React Native ?
Should I somehow schedule some events for scheduling local notifications or should I use some remote push notifications ?
There's no limit on scheduling local notifications. I'm not sure there is limit or not but you can send 10-15 of notifications in a day using this library because I'm using it in that way.
Important thing is that you should set each notification's id (in case of ios userInfo) and it should be different each other.
Related
We are developing an app for Android and IOS for students. student can receive notification for upcoming events like exams or interviews.
We are between two decisions: Using FCM with the development of a backed which manages the sending of notifications and the registration of tokens or using the schedulers that exist in IOS and Android then download a list of events from an API regularly and trigger a local notification which will require less development on the backend side but a little more on the frontend side.
What would be best in your opinion and can we trigger a notification even if the app is closed for the 2nd solution?
I would deffinitely recommend to use FCM. It is much easier than it looks like and the performance of your notifications would be much better regarding stability, timing, battery persistance and other. You can use on of the Firebase databases to store the notification tokens and the Firebase Cloud Functions to send them from there. I have made a very similar App for Kindergarden children and it works great. I'm not sure if it would even work at all when you do it on your own. At least not as you expect it. For me that sounds like much more work.
I am working on a react-native based mobile app using expo.
in the app the user can set schedules for medication reminders, for that I am using expo-notifications to show those reminders.
expo-notifications provides some functions to schedule notifications, but as I found in the docs it does not provide scheduling options that I need, like every Sunday at 09:00am, or every 2 days at 05:00pm, daily at 08:30pm, and so on...
How can I achieve such scheduling?
expo-notifications author here! 👋
It depends on your use case, but I would suggest either:
use push notifications sent from your backend, where you can design any schedule you like (disadvantage would be that an offline device wouldn't receive the notification and that you'd have to write and maintain that backend)
try to work around the limitations
every Sunday at X soon will be achievable with WeeklyTrigger
every 2 days is tricky, maybe an interval trigger with some offset (not possible right now, but I'll happily review a pull request if you submit one)
daily at X is already supported with DailyTrigger
submit a pull request adding missing trigger types or adding features to existing ones.
I am using FCM Cloud Messaging framework to send and receive push messages for both Android and ios. To send messages from my server I call FCM v1 API. I use FCM SDK app in my native app (react native based) to generate device registration token, etc.
I am trying to find ways where the push messages show grouped in device system tray like on Whatsapp i.e. messages containing a particular unique id should be grouped under one category e.g. all messages for a particular stock ticker showing under one group, etc.
When searching for possible solutions I came across various links such as:
React Native - Android - FCM - Display group notification like What's app also allowing multiple grouped notifications
Group fcm notifications like whatsapp but allowing multiple group notifications
But none of those helped. For example sending "tag" field replaces previous message when new one is received with the same value. Moreover when app is closed none of the message handling functions of native app are executing on the device so I believe this should be purely a server side functionality. On FCM docs page there is no reference to grouping of messages.
https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages
Any suggestions on how to implement this ?
I implemented that with the help of the library react-native-push-notification and this issue helped me a lot Group notifications
Is there a way to send push notification with passbook on android ?
I found this https://www.pass2u.net, but i'm not quite convinced...
pass2u have an open API and offer free access to pass issuers with less than 1000 updates per month. One advantage over PassWallet is that their revenue model is not dependent upon advertising.
Both pass2u and PassWallet have reliable APIs that closely mirror the Passbook webservice and can be easily implemented with minimal overhead.
One further advantage of Pass2u over PassWallet is their support for Baidu push. If you have users in China then PassWallet updates will not work because they are dependent on the Google cloud messaging APIs which are not available.
The PassWallet app supports push notifications. It uses the same mechanism and API as Passbook/Wallet on iOS, the only difference being where you send the push notifications.
When a pass is installed, it registered with your service as normal, but in addition to the serial number etc. a URL is provided too. You then send a message to that URL.
You'll find more info here http://attidomobile.com/portfolio/passwallet/
I'm currently in the early stages of designing a cross-platform mobile app (iOS, Android, WP8). At its core, the application will allow proximity based interaction between an unknown number of client devices.
Could someone recommend a framework or technology that would allow me to push server generated location based proximity alerts to the clients that even scales well? Could push notifications (cross platform using PushSharp) be a viable option for this, or will Push notifications always go hand in hand with some kind of toast notification on the device?
Update: 30 seconds or even a minute delay should do.
Push Notifications have way to much latency to give you anything near real-time. Also Push Notifications are not guaranteed to reach a device.
You really need to think about how much time constrained the location updates should be. You should also make some tests with how fast the GPS on various devices updates. I have tested on a Nexus 4 and it is not near real-time either. So throughout your entire application whether it is server side or client side you will have things blowing your real-time wishes.
However IF you can live with a delay of a couple of seconds to maybe 30 seconds or more, Push Notifications my work well for you, they also scales quite nicely.
EDIT:
Push notifications always go hand in hand with some kind of toast
notification on the device?
There is a concept called RAW notifications, which allow you to send arbitrary information with the Notifications. However personally I would just notify the client about updates ready on a server, where it then can get all the information the application needs. This is because as I said Push Notifications are not guaranteed to ever reach the device, but also because you are limited to how much information you can embed in the Notifications.
So my suggestion for a flow would be:
Client A updates its location and sends it to a web service
Web Service receives info from Client A and prepares notifications for all the other Clients, which need information about Client A and pushes information about they need to update their info.
Client B receives a Push Notification telling it to refresh data from the Web Service and does that.
That would work well if the application is in a background state. When showing in the foreground I would simply poll a server every second or so; Still receiving Notifications just forcing the client to update.
For the "scales well" part, you might also want to take a look at Windows Azure Service Bus Notification Hubs. It's currently in preview and supports only Windows 8 Store apps and iOS but support for Android and Windows Phone is on the way.