Facebook App Analytics Push Campaigns using Firebase Cloud Messaging - android

I am trying to integrate Facebook app analytics push campaign into android/iOS app.
We have already got a custom push mechanism using Firebase Messaging.
Going through the the set up steps to set up push campaings (https://developers.facebook.com/docs/analytics/push-campaigns/android)
I see that it requires app to use GCM.
Is it possible to configure Facebook app analytics push campaign & in app notification features using Firebase Messaging ?

You can use FCM for Facebook app analytics push campaign. Enter the same Server Key of your App(FCM Console -> Project Settings) to Facebook Analytics Settings Page under API Key.
Follow the same instructions for App,
https://developers.facebook.com/docs/analytics/push-campaigns/android
You can also test if the push notifications delivers fine in Facebook Analytics page Event Debug section.
For Inapp Notification you have to add the following to your gradle dependencies:
compile 'com.facebook.android:notifications:1.+'
https://github.com/facebook/FBNotifications

Absolutely. In fact, you need Firebase Cloud Messaging in order to configure Facebook Push Notifications. If you see the content of the link https://developers.facebook.com/docs/push-notifications/quickstart, notice how under the heading "In-App Notifications", it says: "Prior to sending in-app notifications you will also need to integrate the FBNotifications library." Then if you go to https://github.com/facebook/FBNotifications, you will see that under the heading "Getting Started on Android", it says: "After you've added the dependency, you'll have to set up an FCM listener service,..." It is asking you to set up an FCM listener service and providing this link which contains the instructions to configure Firebase Cloud Messaging: https://firebase.google.com/docs/cloud-messaging/android/client.
Conclusion: Firebase Cloud Messaging is not an option if you want to configure Facebook Analytics Push Campaigns. It is required. Firebase Cloud Messaging can operate without Facebook Analytics Push Campaigns, but not vice versa.

Related

Firebase Cloud Messaging API (V1): Server Key missing

We're using Urban Airship to send push messages to our Android app.
In that process, we need to configure Airship with 'Server Key' provided in Firebase Console -> Cloud Messaging.
As recommended there, we are trying to migrate from GCM to FCM.
The problem is that 'Server Key' is missing in 'Firebase Cloud Messaging API (V1)' configuration.
It is still available in 'Cloud Messaging API (Legacy)' configuration, but migration is suggested.
Following the links in FCM configuration didn't help too much with this issue.
To access the server key:
Open Project Settings as you already did
Open the Firebase Cloud Messaging API menu (to the right of the Enabled)
Click on Manage API in Google Cloud Console, it will redirect you to Google Cloud Platform
In Google Cloud Platform, you will get Firebase Cloud Messaging API, click on Manage. It will redirect you to APIs & Services
Click on Credentials (on the left side of the screen)
There you will get different tables. One is called API Keys and inside you will see an entry called Server Key
Click on Show Key, and you will get what you want
I hope this will help you
Firebase cloud messaging is now shifted to API (V1)
So to get the serverkey you should enable the cloud messaging API (Legacy).
Follow the steps:
Click on the three dots and click on manage Api in google cloud console
Click on enable.
3.Now redirect back to the main page and refresh the page.
Now you have your serverkey
Hope it helps!
Reference: https://stackoverflow.com/a/72719766/13431819
From Firebase Cloud Messaging API (V1), we have to enable the cloud messaging service.
Open project settings
Select three dot menu right to Cloud Messaging API (Legacy) and tap Manage API in Google Cloud Console
In the redirected Google Cloud Console enable the cloud messaging service.
Go back to project settings and refresh. You can get the server key now.
Reference - https://documentation.onesignal.com/docs/generate-a-google-server-api-key

Is it possible to use AppCenter Push notifications without GCM?

I have purposely built Android mobile phone without Google Play or any of the Google services installed. I'm building Xamarin.Forms mobile app and need to show Push notification. I'm trying to do this using AppCenter, I can see that the device has been registered on Analytics, but no push messages are showing up. Am I missing anything?
Google announced it is migrating from the Google Cloud Messaging (GSM) platform to Firebase Cloud Messaging (FCM). For Android developers, the Firebase SDK is required to use Push Notifications. For additional information, please refer to the SDK migration guide.
and
Only devices with the Google Play Store application or emulators using Google APIs images can receive notifications.
https://learn.microsoft.com/en-us/appcenter/sdk/push/android
You need FCM (GCM is deprecated)

Disable app using Firebase messaging remotely?

I want to stop all Firebase Cloud Messaging functionality from my app completely. How can I do it? Does removing the Firebase project prevent the app from using all the Firebase Messaging related functionality? I tried disabling the Firebase Cloud Messaging API from Google's API console but it reenables itself automatically next I sent push notification using Firebase Cloud Messaging.
I just want to disable all Firebase Cloud Messaging related functionality from all versions of my app without creating another APK.
if you want to stop all the servcices of firebse in your running app there are 2 ways to stop them ;-
1) remove all the SHA from firebase console.
2) Delete your firebase project from firebase console.

Is Google GCM still available?

I'm trying to create a simple android push notification app using Phonegap build and GCM.. I currently can get the android's device token using a phonegap plugin and store it in my database without any issue.
I just need to know if I can still use GCM (Google cloud messaging) OR I need to start using FCM (Firebase Cloud Messaging)?
Any tutorial I found on Google is about GCM and they all say to enable the 'Auth & API' under the google cloud messaging section in the google console. but when i go to GCM in my Google console, I don't see anything like that and everything seems to be about FCM which is frustrating when there are no information about how to use it with Phonegap build!
Is Google GCM still available or the new app 'Have' to start using FCM from now on?
I mean Google console is confusing enough without them keep changing everything every month or so!!
Could someone please advise on this issue?
Cloud Messaging (GCM) is now part of Firebase, see also this link.
Firebase Cloud Messaging (FCM) is the new version of GCM. It inherits the reliable and scalable GCM infrastructure, plus new features!
If you are integrating messaging in a new app, start with FCM. GCM users are strongly recommended to upgrade to FCM, in order to benefit from new FCM features today and in the future.
Is GCM going to be deprecated?
We will continue to support the current version of GCM Android and iOS SDKs because we know a lot of developers are using GCM SDKs today to handle notifications, and client app upgrade takes time.
But all new client-side features will be added to FCM SDKs only moving forward. You are strongly encouraged to upgrade to FCM SDKs.
In short, stop using Google developer console in order to use GCM, use this:
https://console.firebase.google.com/?pli=1, as shown below.

Azure Notification Hub no longer accepting GCM API Key

Recently, every time I try to add or modify the GCM API Key in an Azure Notification Hub, I get the following error:
SubCode=40000. Failed to validate credentials with GCM. The remote
server returned an error: (401) Unauthorized...
I have tried using the same key that works in other Notification Hubs, as well as creating a new one via the Google Developer's console.
I've also recently come across articles stating that GCM is moving to FCM (Firebase Cloud Messaging). Could this be the cause of my issue? Is Google beginning to no longer support GCM?
There are two important informations:
Firebase Cloud Messaging (FCM) is the new version of GCM
So we should prefer Firebase Console instead of Google Cloud Console,
There is a useful article here Enabling Google Cloud Messaging (Firebase)
So we need to enable Google Cloud Messaging in Firebase Console for your added Android App.
Step by step:
-- Open your Firebase Console
-- Add your Android app in Firebase Console.
-- Go to Settings
-- Click CLOUD MESSAGING tab.
-- Take Legacy Server key there and use it in Azure Push Notification Service for Google(GCM) settings and Save it. That's all.
This article helps you how to create a Notification Hub Service in Azure then how to connect your Android or IOS App to Firebase Console etc.
Could you make sure that 1) you have enabled Google Cloud Messaging for Android in your cloud push account and 2) you are creating a new Server Key?
Also, use try sending a push notification from the command line to validate that the key is working with GCM directly. If that works, then Azure portal should accept the key. If that's not the case, please leave a comment.

Categories

Resources