Firebase Push Notification Internationally - firebase

I was able to integrate Firebase Push Notification into my android/ios app. My apps started getting international users and my question is Firebase Push Notification still works fine for them?
Is there anything i need to do to support Firebase Push Notification internationally?

No extra implementation needed. The notifications target the devices. So long as the device meet the pre-requisite to receive a message (just a stable connection) then it should be able to receive the sent notifications.

Related

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

Show notification based on a Firebase values

I want to show notification in my app even if the app is closed.. I don't need Firebase's Push Notification Service. The idea is similar to WhatsApp's message notification service.
When a value is added to firebase by a user another user should receive notification that there is a value change
Can someone tell me how this is done and What should I use to achieve this?
Push notifications for all major apps run through APNS for iOS, and Firebase Cloud Messaging for Android. While the apps may use a higher-level service from their application code, those services depend on APNS and FCM for the actual message delivery.
To see an example of how to build a notification system on top of this, based on values being written to a database, see Send Firebase Cloud Messaging notifications for new followers.

Firebase Cloud Messaging - Identify delivery status for a particular push notification message

Is it possible to identify whether a particular push notification message was delivered to a particular token via Firebase Cloud Messaging? And, if so, is it possible to do so via an API call or by listening to some callback?
I know that I can look at aggregate statistics in the console and even segment those statistics through analytics tags, but cannot find a way to get more discrete information.
I also know that the API will synchronously respond if a token is invalid but the process by which Apple and Google invalidate tokens is a bit opaque (to me) and doesn't help if someone simply turned off push notifications for my app.
Thanks!
Jason
If someone turned off push notification – you can check it with code
Swift ios check if remote push notifications are enabled in ios9 and ios10
Android app - detect if app push notification is off
But user can be offline, or APNs / Firebase service – can get some problems and your notification will be drop. You can check delivery status with some code in iOS and Android applications.
If you need check, delivery status for some push you can make push notification extension (in iOS). For send status about delivered notification in your API. More info about push notification extension.
https://developer.apple.com/documentation/usernotifications/unnotificationserviceextension
It can be helpful
https://developer.apple.com/documentation/usernotifications
https://developer.apple.com/documentation/usernotifications/modifying_content_in_newly_delivered_notifications
https://firebase.google.com/docs/cloud-messaging/understand-delivery
https://firebase.google.com/docs/cloud-messaging/android/receive#handling_messages About handling messages in Android (you can send status delivered too)
I hope this answer will help with your problem.
UPD:
https://firebase.google.com/docs/cloud-messaging/understand-delivery
Received (available only on Android devices) — The data message or
notification message has been received by the app. This data is
available when the receiving Android device has FCM SDK 18.0.1 or
higher installed.

How to create a "real" iOS push notification from Firebase topic messages if the app is not running?

As far as I understand messages on subscribed topics are received through the socket connection.
So while the app is running in the background I could create local notifications and "fake" notification that pop up on the home screen and are visible in the notification center.
But is there a way to receive topic pushes if the app is closed/not running in the background?
I'm grateful for any kind of feedback as I couldn't find any documentation regarding that specific use case.
Just to clarify: I am talking about (subscribed) topic messages in firebase NOT the firebase messages. I am used to the generic iOS push notifications handling and the involved lifecycle methods. All I need to know is how firebase topic messages can be sent via apns notifications.
With Firebase Messaging you can send notifications so the app is closed (it must be installed), basically it is configured in the AppDelegate the methods and configuration according to your need, you can see more information here Firebase Messaging
No you can’t, setup your configration in apo delegate and firebase settings, when the app is offline firebase talked directly to the APN which called the nitification center in your iphone but you don’t have access on it during the application is closed.

How Firebase push notification work on IOS?

I want to create my own push notification mechanism for my own iOS applications.
I compared some services like pushy.me or Google Firebase. I think Pushy is the only service that can push notifications independent from Apple APNs, but it uses simple HTTP long-poll requests to receive notifications (in the iOS SDK).
But how does Firebase work? Does it still depend on Apple's APNs? How will it affect my battery life?
Firebase Cloud Messaging (FCM) delivers push notification to iOS devices via Apple's Push Notifications service. Also FCM extends functionality of push notifications.
How FCM extends?
FCM works with iOS and Android. Cool feature if you have the app for both platforms;
Don't need to develop backend for sending notifications, storing pn tokens etc. Just register your app in the Google Developer Console and follow User Guides. For sending a push just execute request to https://fcm.googleapis.com/fcm/send with params;
Broadcast notifications. The app subscribes to a topic and then you can send a notification to all topic subscribers. Very cool;
Upstream messages (send data to the server)
Also Google has others services you can extend FCM with. For example Cloud Functions.
I didn't find that FCM integration take big affect to battery life in my apps.
UPDATE:
FCM framework sends push notification token (and other info) to Google services. Also as I mentioned above you can subscribe app for a specific topic. Than Google knows which device needs to send a push to.
There is a possibility to setup FCM in iOS automatically(with using method swizzling). FCM exchange AppDelegate methods and knows your's device pn token.
Firebase Cloud Messaging (FCM) utilizes APNs (Apple push notifications services) for delivering the messages to iOS devices.
So basically, FCM wraps iOS methods like registerForRemoteNotifications or didReceiveRemoteNotification using method swizzling (BTW, you can disable this if you wish, although I can't see any reason...).
On the technical side - the phone is keeping an open connection with APNs and this tunnel is used for sending the messages themselves.

Resources