Expo how to subscribe to FCM Channels - push-notification

https://docs.expo.io/versions/latest/guides/push-notifications/
Following the docs I couldn't find a way to subscribe to a topic on fcm. I don't know if APN has topics like fcm. But if it does, it would be great to be able to subscribe to channels on both Android and iOS. Now the question is does expo support this behavior? For both Android and iOS or any?

This is not supported on Expo, you need to manage things yourself and push a msg to each user using their token.

Related

VS 2022 Xamarin.Forms Firebase Cloud Messaging working example

Trying to add Push Notifications to my Xamarin.Forms app, and cannot find any working example to implement Firebase Cloud Messaging.
I mean, not a single working example of all the examples/tutorials.
Can you point me to one, please?
You can first check document Firebase Cloud Messaging. This article provides an overview of how FCM works, and it explains how to configure Google Services so that your app can use FCM.
The implementation process in xamarin android is similar to that on xamarin forms.
You can also find more tutorials in your browser.
For example:
Implement Push Notifications with Xamarin.Forms (Android) and FCM
and
Implement Push Notifications with Xamarin.Forms (iOS) and FCM .

React native app sending push notification while device is offline

I'm about to develop an app similar to a birthday reminder and I plan to use firebase for push notifications but what makes me second question my choice is whether users will be able to receive a birthday notification if they are offline(not connected to internet for the whole birthday day). I know firebase has some offline persistence support but I'm not sure if this includes push notifications support. Are there any options to achieve that with firebase or with any other tool compatible with react native?
If the device is not connected to the internet, it is going to be impossible to deliver messages to it through Firebase Cloud Messaging or other internet protocols.
The common way to deal with such a scenario is to deliver the message to the device when the user does have an internet connection, and then only display it once it's the right time. By sending a data-only message through FCM, your application code controls exactly what happens with the message data.
There are essentially two types of notifications: in app messaging and cloud messaging. Both are offered by Firebase: In App Messaging and FCM (Firebase Cloud Messaging).
The details you've given about your app is a little bit vague but if you're asking for push notifications, then FCM does the job. FCM will send notification when the app is on background or killed (exited out). When you say device is offline I'm assuming you mean when the user isn't using the phone. Yes, the notification will still come.
https://firebase.google.com/docs/cloud-messaging

FCM - why no longer support FCM direct channel in newer Firebase Admin SDK?

I am trying to implement server for FCM to send notifications to android/iOS devices.
I need to send data-only notifications to both android and iOS but iOS seems very unstable for background notifications. (even though the app is in foreground, I often not get message at all.)
When I test with legacy FCM REST server with FCM direct channel, it works great on iOS but this is not an option for me as newer Admin SDK doesn't support direct channel.
Is there any reason to remove support for FCM direct channel in newer Admin SDK? I see all Firebase docs recommend to use Admin SDK but not sure why they removed the support for direct channel.
If I'm not mistaken FCM sender-side APIs never explicitly supported a direct channel option. As a sender your options were to either specify a device registration token or a topic. These options are present in the newer FCM sender-side APIs (i.e. Admin SDK) as well.
Direct channel is a receiver-end option. I see this option was recently deprecated in the iOS SDK. Folks who work on that repo should be able to provide you more context around that decision. Also if you're experiencing issues with background notifications on iOS I'd recommend you file a bug for the iOS SDK, and try to get it fixed.

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.

Can use Google's Cloud Messaging for iOS in a hybrid app?

I am planning to build a "hybrid app" using PhoneGap which needs to have a iOS push notification engine.
And I want to use Google Cloud Messaging for sending push notifications to the iOS (I have used this for sending notifications to Android).
My questions here are:
Can I use Google Cloud Messaging for iOS in an hybrid app (using PhoneGap's https://github.com/phonegap-build/PushPlugin)?
Are there any changes that I may have to do while using the above plugin?
I have used the above PhoneGap plugin to receive notifications from GCM and APNS separately but this time I want to use the GCM for both iOS and Android.
Any help will be appreciated.
I also have used GCM and APNS separately for send push notifications to Android and iOs devices independently.
For all the documentation I've read, GCM for iOs devices is an approach of the APNS service but using the same structure that GCM is using for Android devices. I think that if you have used the APNService, you have found all the hard steps (certificates, using strictly a Mac for some things, ...) so, answering to your questions:
Yes, you can use the GCM for iOs with Phonegap plugin because GCM Server sends the data that PhoneGap's plugin is ready to receive (as you can see in the GCM Server Reference there are some data specific for APNS (nothing that you don't know if you have worked with APNS)).
If you are preparing a native app for iOs, you should see the GCM iOs Client documentation because you will have to use the iOs API but it's not your problem.
I don't expect that you have to do changes while using PhoneGap's plugin. You will only have to use PhoneGap's implementation for iOs devices and get ready to receive push notifications (but if you have some troubles, please, I will be pleased to know them).
Good luck!

Resources