Android FCM push logs - android

I want to see all the logs of push notifications received on my android device. I'm sending the FCM token of my device to my backend server, and the push is sent using PHP code to my device.
Does firebase console provide any statistics/logs of all push received for the specific device?

Firebase doesn't keep the track of device-specific notifications.
Instead, what you can do is while sending notifications from the back-end, just keep the track of notifications sent to specific devices by storing this data on your database, and then you can fetch it on your android device.

you could do kinda of that. Using analytics labels (only with FCM API v1) you can see on the firebase console the stats about received messages. If you use a specific label only for your device, you will know how many notification have been received by that specific device.
https://firebase.google.com/docs/cloud-messaging/understand-delivery?platform=android

Related

How to ensure firebase has received push notification sent from app server, without android app

I am new with Firebase. I want to send push notifications to an android app from a spring application. At preset I dont have an android app. I want to test whether the firebase integration is correct or not, which means I want to make sure that the push notifications sent from the backend server are recieved correctly in firebase .
How do I ensure that firebase has recieved the push notifications sent from backend server?
Is it possible to test push notifications without an android app registered on firebase? If yes, how do I do that?
I am using Firebase Admin SDK. Do I need a separate server key other than the service account key for sending notifications?
You'll get a success (or fail) response when sending messages. This means that FCM has received your message and it will try to deliver it to the users.
FCM needs to target your app in order to send notification. If you don't set up FCM SDK in your app, it wont be able to do so.
You just need to generate an auth token. This guide should help you set it up.

FCM: Access all sent push messages

The goal I want to achieve for the app owner is to send FCM push notifications via web interface to the customers (already achieved) and to give the customers a view in my app, on which they can read all or at least the last 10 sent push messages. Is there any (REST) api in FCM which can be used to receive the sent push notifications and its content so I can display them in my Android fragment?
Unfortunately, there is no available API as of the moment to retrieve your GCM/FCM logs. However, there's been a recent improvement in the Firebase Notifications console where stats for messages sent using the FCM API is included in the Firebase Notification console stats.
The more details can be found from this answer and the blogpost.

Does Android wear 2.0 has its own GCM/FCM Registration ID?

As a part of announcement of Android Wear 2.0 there was declared:
Standalone applications: direct network access to cloud (apps run on
watch even when your phone isn't with you).
The question is does this means that android wear application can get its own GCM/FCM registration ID and receive push notifications directly to the watch without phone at all? Can someone here prove it with documentation or on its own experience?
What happen if I have same applications on the device and watch, that receives push notifications?
Thanks in advance.
It is stated in the documentation of Android wear 2.0 under the Cloud Messaging that for sending notifications, apps can directly use Firebase Cloud Messaging (FCM). Note that FCM is supported on Wear 2.0. and GCM is not supported.
Here are the other details that you can find in this documentation.
FCM is the recommended way to send notifications to a watch.
Provide for messages from FCM by collecting a registration token for a device when your Wear app runs. Then include the token as part of the destination when your server sends messages to the FCM REST endpoint. FCM sends messages to the device identified by the token.
An FCM message is in JSON format and can include one or both of the following payloads:
Notification payload. When a notification payload is received by a watch, the data is displayed to a user directly in the notification stream. When the user taps the notification, your app is launched.
Data payload. The payload has a set of custom key/value pairs. The payload and is delivered as data to your Wear app.

FCM (Firebase Cloud Messaging) how to send to all Phones?

I have created a small App that's able to receive Push Notifications from the FCM Console.
What i want to do now is to send a Push-Notifications to all Android Phones that got the app Installed using the API. And this is where i got completely lost.
Is there no way to send it to all Phones without collecting all the registration-ids?
Does this only work with the Console but not with the API?
thanx in advance
Sending a message to all the phones like what you do from the Firebase Web Console is only possible from the Web Console.
If you need this feature from the API you can submit a feature request:
https://firebase.google.com/support/contact/bugs-features/
Another possibility is to have all the client registering to a specific topic via FirebaseMessaging.getInstance().subscribeToTopic(topicName)
In this way you can send a message to the whole topic without collecting the registration-ids manually.

Android Push Notification/Message Concept

can someone explain about how push notification or message in android working? Does it operate within a VPN? How can the server send data to the device if it's not in the same network? Is it possible to make your own push notification/message? Please enlightened me :)
Push Notification in Android means, Google Cloud Messaging. First we need to enable google cloud messaging service from google developer console. Then need to create browser key to give from server side.
Now, when user need push, we have to register the device id to the google cloud server and it saved it permanently.
Now when server fires push at that time server request google cloud to send message to registered device id, and using that device id, google sends message to that particular device. So basically, whole things are depends on Device id.

Categories

Resources