Twilio Chat push notifications - push-notification

We are using the twilio-chat#1.0.4 JS SDK in our react-native app.
We're using react-native-push-notification#3.0.0 to handle the notifications.
The pushes are enabled and can see them coming through from twilio.
But I can't figure out how to turn on alerts.
I can (and currently do) issue a local notification when the app is in the background but we'd like to see the alert even if the app is closed.
How can we configure the push notifications to include an alert.

I had similar needs but the only difference in my case am using twilio native chat wrapper instead of the JS sdk.
To enable have push notifications working I ended up forking https://github.com/zo0r/react-native-push-notification and customizing it to support twilio push notifications which have custom payload than what you might be used to.
Check https://github.com/zo0r/react-native-push-notification/compare/master...Kabangi:master for the changes I made you might get some ideas from it.

Twilio developer evangelist here.
Twilio Chat JS 1.1.1 was recently released and actually contains methods for dealing with push notifications.
Also, did you follow the instructions for React Native's PushNotificationIOS that explain how to setup your iOS application for receiving push notifications?

Related

Can FCM push notifications in Electron App

I'm trying to send notifications from Firebase Cloud Messaging (FCM) to a window app (window form for example) but it doesn't seem to be possible (since fcm only supports android/ios/webapp, for here and here).
So trying building Electron app to be able to receive and display notifications from fcm (slack is built from electron js and also displays notifications, here), and found the electron-push-receiver allowing it to receive notifications from FCM
But it seems that there is no update for a long time, so there is a issue#80
Now is it possible to build electron application that can receive notifications from FCM?
Thank you very much!
I just implemented FCM in my Electron app earlier today by following the guide here:
https://github.com/CydeSwype/electron-fcm-demo
Screenshot of FCM working in an Electron app
I was skeptical at first as well, given that the repo hasn't been updated in a while, but was pleasantly surprised that it still works.
If you have any further questions, go ahead and I'll try to help :)
I also got this working with electron-push-receiver, though I had to do a workaround for more recent versions of Electron.
I looked at the firebase-admin.messaging Node package but that is only for privileged environments.
The HTTP 503 issue you linked it seems was just another outage that has been resolved; I can still register for push notifications with this setup.

Push notification in xamarin.forms

I asking this question for clarification about push notification in xamarin. I have a xamarin.forms app which will display certain items in list view.The back-end of my app is in .Net. The items which shows in list view inside app is added from back-end.What I am trying to achieve is whenever items add in back-end, I want to receive notification in my app.
For the notification part I found two options.
FirebasePlugin Link
Azure push notification
I need some clarifications about
Which way should I follow? Is there any other cost effective way to implement push notifications in ios and android in cross platform way(Xamarin.forms)?
For implementing push notifications in ios ,is APN certificate is mandatory? Currently I don't have apple developer account.So for testing notification in ios seems difficult.
Any help or guidance is appreciated
Which way should I follow? Is there any other cost effective way to implement push notifications in ios and android in cross platform way(Xamarin.forms)?
From my experience the easiest way for me was to use firebase console to manage notifications both for Android and iOS. I have similar platform that uses push notifications to users whenever webapp database is updated, by certain users. To my disappointment Azure Push were more complicated to manage.
For implementing push notifications in ios ,is APN certificate is mandatory? Currently I don't have apple developer account.So for testing notification in ios seems difficult. Any help or guidance is appreciated
Yes. Apple developer account is mandatory. Moreover you cannot test your push notifications on iOS emulator. You must use physical device.
App Center Push is what I've started using now. Push services are free (which is great) and they have Xamarin SDKs which handle most of the platform specific config so it's really quick to get push working.
As the other answer has stated, you will still need an apple developer account and physical device to test on iOS.
It's part of the the Microsoft App Center offering which provides many other useful services for mobile development.
#groveale App Center Push feature is being retired(https://learn.microsoft.com/en-us/appcenter/push/) so I would suggest using firebase or the implementation provided by xamarin docs.

Push notifications API for Appcelerator

Is there way to send push-nofications in Appcelerator not from console (https://platform.axway.com/)?
For example does Appcelerator have custom API to send push-notifications? e.g. our server sends request to appcelerator API and it sends push-nofication to devices.
There are tons of free and open source modules out there with which you can set it up yourself. Some rely on services like Onesignal, others are completely open.
Keep in mind, for iOS you don't need a module, you just get the token (as per docs) and then you just send it to your backend and it works.
A good module for Android with which you can use your own backend is Ti.Goosh
Yes you can use axway REST API to send your push notifications.
https://docs.appcelerator.com/platform/latest/#!/guide/Push_Notifications

Why use a push notification service over a Web Push library?

I'm planning to add push notifications to my web app.
As far as I understand it, to push notifications to my users, I can either use a web push library and deliver the notifications directly, or use a push notification service such as OneSignal, Firebase Cloud Messaging, or Batch.com.
From what I understand, these services offer a one-stop solution to deliver notifications not only as Web Push, but also to iOS and Android apps.
If I'm focusing only on Web Push for now, is there any advantage I should be aware of, to use one of these services over a web push library directly?
Web Push is a standard which is still under development and subject to change. Also browser support is quite limited at the moment (see https://caniuse.com/#feat=push-api).
The advantage is: you have one API to rule all the supporting platforms (including desktop).
Disadvantage is: You have to be aware that not all platforms support the standard.
Using a notification SaaS solution to handle notifications enables you to handle all platforms. Sending out a notification from your backend will be a single call to your notification SaaS service, but you still have to be aware, when you want to have native notifications on Android, iOS and the browser, you will have to handle the integration of those platforms differently in your client apps (see example here using Google Cloud Message integration in an Android App: https://firebase.google.com/docs/cloud-messaging/android/client).
So your decision should be based on which platforms you have to support.
- If you get away with supporting Chrome, Firefox and Edge browsers on non-iOS-Devices (or handle iOS Notifications differently), you can use Web Push.
- Otherwise i would choose a Notification SaaS Solution.
The most important point for me personally when doing your own implementation is that you control everything. This means that your notifications don't fail when AWS loses a region or pricing changes and you can't afford it any more. Not any provider can ban you because of the content you distribute or the complaints from users. You can implement your own logic for showing the notifications on the front-end, like stacking them or having your own segmentation rules (paying users versus free tier, for instance). I'm not even speaking of the custom subscription UI. No weird copyright in your messages.
From what I understand, these services offer a one-stop solution to deliver notifications not only as Web Push, but also to iOS and Android apps.
When you've got the server logic to process the app events and send notifications in place, it shouldn't be really hard to extent it do work with mobile push notifications. The only thing that changes is the way you subscribe devices.
And the last, but not the least - it's fun to develop. This is more of a personal matter, I guess, but I like learning new thing :)
Hope that helps you to make a decision.
you can implement push notification to your website without using third-party libraries. You have required to get subscription token from the client and store this subscription token onto the server (Inside database). After when you want to send a push notification to the user then you have to just call endpoint (endpoint is mentioned in subscription token). That's it.
Due to security risk and managing subscription tokens, developers prefer to use firebase, AWS push notification or onesignal.com services. These services are optional you don't need at all.
Read links introduction to push notification and also the same lab code examples. Later I will update with simple working code for further reference to your question.
It depends on what you want. It‘s not possible to use iOS Safari for Web-Push. For notifications to iOS you have to use a service or build your own app.
I use Pushover for notifying myself from Scripts and Software. That may or may not be a solution depending on how much users you have, how many notifications you send and how willing your users are to use a web app like Pushover (or an app on iOS).
A service will keep notifications going when things change. So it should be less maintenance for you.
If you want to target iOS visitors also, this is not possible, as web push notifications are not supported by iOS.
To circumvent this, you need to use a third party service like Wise Notifications.
The alternative is to build an iOS app and send native push notifications.

Local notifications with Unity (Firebase?)

Is there an easy way to implement local notifications from the Unity client?
I'm using Firebase for handling our push notifications (which are sent from our server), but I was wondering if there is an easy way to support local notifications?
I found this question: Firebase local notifications
But it is specifically to iOS.
I was wondering if there is a solution for Unity (without the need to write some iOS and Android plugins) where I can schedule local notifications from the client side.
It seems that for iOS you can do it directly from Unity, without iOS native code (like presented here).
For Android, you can use an existing plugin, like this, or this

Resources