Use Firebase Notifications using Notification composer targets - firebase-cloud-messaging

I would like to use Firebase Notifications and target users by App, Version, Country, Language, etc.
Is there an API to let me send notifications using targets?
In the case of iOS I can't use the Notification Composer because I have to send the field mutable-content and/or content-available. Even when I send them on additional options they are ignored.
https://medium.com/#tsif/ios-10-rich-push-notifications-with-media-attachments-a54dc86586c2
Any other valid approach is welcome.

Related

Expo Notification askAsync() - Is there a way to customize the message?

I am using EXPO on a react native project and want to ask the user for push notification permission.
When I use the const {status} = await Permissions.askAsync(Permissions.NOTIFICATIONS); the message that appears is
"Expo" would like to send you notifications. Notifications may include sounds, badges, alerts and icon badges. These can be configured in settings.
My end user doesn't know what "Expo" is, they just know the app name. Is there a way for me to customize the "Expo" part to the app name?
How have people handled this when their app is ejected and push to the app store?
You can find the answer in here: https://docs.expo.io/distribution/app-stores/?redirected
Which says:
System permissions dialogs on iOS
If your app asks for system permissions from the user, e.g. to use the device's camera, or access photos, Apple requires an explanation for how your app makes use of that data. Expo will automatically provide a boilerplate reason for you, such as "Allow cool-app to access the camera", however these must be customized and tailored to your specific use case in order for your app to be accepted by the App Store. To do this, override these values using the ios.infoPlist key in app.json, for example:
"infoPlist": {
"NSCameraUsageDescription": "This app uses the camera to scan barcodes on event tickets."
},
The full list of keys Expo provides by default can be seen here. Unlike with Android, on iOS it is not possible to filter the list of permissions an app may request at a native level. This means that by default, your app will ship with all of these default boilerplate strings embedded in the binary. You can provide any overrides you want in the infoPlist configuration. Because these strings are configured at the native level, they will only be published when you build a new binary with expo build.
You probably use Expo Go to develop your app , when you create standalone app (when you deploy the apk) it will show the app name that you specified in app.json.

What exactly happens after 10.04.2019 with legacy android apps that use GCM

We are unsure what exactly will happen with our existing apps that use GCM after 10.04.2019.
We have updated the server-side of our apps
We have new FCM-based versions of our Android apps.
However:
We cannot force the existing users to update their apps
Corporate clients might even continue to roll out outdated app
packages to new users
The information / documentation we found somewhat unclear to what will happen in such cases. Therefore, we decided to put our assumptions into 4 statement and we hope someone will be able to confirm them.
It will not be possible to put apps which use the GCM APIS into the Play Store after 10.04.2019
It will not be possible to generate a new GCM tokens after 10.04.2019
Existing users with existing apps which have already have a GCM token will be able to use their apps normally without being forced to update. E.g. Push notifications and related things will work for them.
A user of an existing app which never created a GCM token will not be able to create a GCM token and thus not be able to use any GCM related functions (e.g. Push notifications and related things). Such a user would need to update to the apps in order to e.g. receive push notifications.
I hope someone can confirm above assumptions.

How to Send Push Notification to Xamarin Android app?

I need to implement push notification to our Android App using Xamarin. Here is the process. We have web version which used by the Manager. The Manager creates and assign job to the driver. The App version is used by the Driver where it shows the list of jobs and processes of job until its complete. So, when the Manager assigned the Job to the Driver in the Web version, it will then notified to the Driver in the App version that "new job is assigned". Basically, both the web and app uses same database then we created an api(REST API in MVC C#) to connect and get data from the db to be used in the mobile app.
Can someone recommend to me which Push notification plugin(a plugin or nuget) should I use to do this? Currently, I have set up Push Notifications through App center & Firebase but not sure how this work.
Thank you.
I need to implement push notification to our Android App using Xamarin.
I would suggest you use Firebase for mobile push notifications for Android as it is a product by Google, and was made for mobile applications. For push notifications, you will be using Firebase Cloud Messaging also known as FCM. See to it that you are well versed on how it works before you start coding anything read the documents it answers most of your questions there itself.
The Manager creates and assign job to the driver. The App version is used by the Driver where it shows the list of jobs and processes of a job until its complete. So, when the Manager assigned the Job to the Driver in the Web version, it will then notified to the Driver in the App version that "new job is assigned". Basically, both the web and app use the same database then we created an API(REST API in MVC C#) to connect and get data from the DB to be used in the mobile app.
For this, you will have to check on how to work with Firebase using Rest-API. Once you configure the Rest-API and then apply your business logic to it things will be quite easier than you might have imagined.
Can someone recommend to me which Push notification plugin(a plugin or NuGet) should I use to do this?
My recommendation is quite simple, Do not use any sort of a firebase push notifications plugin!. I have had a very bad past with plugins and ever since then I never recommend fellow developers to use plugins until it is a well-maintained one. I would rather ask you to simply configure Firebase on the basis of the guides that are available online. Like the following Xamarin.Android guide for FCM. It is detailed contains everything that you are looking for and what else I would suggest is you check firebase related answers on SO and you will find that almost everything that is not available in docs is covered around here and in detail. Like the following:
How to handle Firebase Notification i.e. Notification Messages and Data Messages
Push Notification in android with firebase get token
How to send device to device messages using Firebase Cloud Messaging?
Receive push notifications on one android app from two Firebase projects

How can i get parameters from play store download link

I am currently developing a mobile app with react-native and this app contain a invitation code.
Store download link will have a invitation code parameter.
I want to get this parameter from downloaded apps via store download link.
How can i do this on react-native ?
Thanks in advance
Use Firebase Dynamic Links
Firebase Invites makes it simple for users to send content to their friends, over both SMS and email, by ensuring that referral codes, recipe entries, or other shared content gets passed along with the invitation—no cutting-and-pasting required.
Documentation https://firebase.google.com/docs/dynamic-links/
How does it work?
You create a Dynamic Link either by using the Firebase console, using a REST API, iOS or Android Builder API, or by forming a URL by adding Dynamic Link parameters to a domain specific to your app. These parameters specify the links you want to open, depending on the user's platform and whether your app is installed.
When a user opens one of your Dynamic Links, if your app isn't yet installed, the user is sent to the Play Store / App Store to install your app (unless you specify otherwise), and your app will open. You can then retrieve the link that was passed to your app and handle the deep link as appropriate for your app.
For react-native use react-native-firebase https://www.npmjs.com/package/react-native-firebase
and
https://rnfirebase.io/docs/v5.x.x/links/reference/links

Does GCM support notifications over SMS

I'm working on a project that respond to users by sending SMS for their request.
Right now I use telerivet for forwarding the SMS to my back end.
I want to know whether I can use GCM to send SMS notification.
Just to add to what #Nilesh already said, you can actually check if a certain app would provide SMS services. Simply look into the uses-permissions in its manifest.
As you can see in the required components of the GCM manifest, it does not require SEND_SMS or RECEIVE_SMS permissions, which you would have needed to support sending or receiving SMS, respectively.