is gcm push notifications are slow in android? - android

I am using Google Cloud Messaging in my application. I am facing this issue. some times i am getting push notifications earlier and sometimes i am not getting even single message also.on that time i am switching the wireless or mobile internet data on and off than the notification are coming..
how to get notifications fast from Google Cloud Messaging server....
please any help me with u suggestions....
http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/

Yes its depends completely on the gcm servers. Basically what happens is when you create google api key(gcm key, you tube api key etc ) at google api console it takes time to propogate to all the servers i.e the server where you have created the api key and the server which your using push gcm notifications are different.So at starting you will face some issue, after words it works smoothly.

Related

Get list of Firebase notifications?

Is there a way to see all the notifications sent via Firebase?
I can't find anything in the docs or anywhere else.
It'd be cool if it is possible over the console, but HTTP would do as well! Any ideas?
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 (sent count only for now) for messages sent using the FCM API is included in the Firebase Notification console stats. From my answer in the similar post:
As of August 2018, stats for messages sent using the FCM API are now visible from the console. From the Cloud Messaging section, click on the Reports tab. From there, you will be able to filter by message type (notification, data, and all)
It would seem that the Impressions and Opens are still only available for messages sent using the console. But Sends for sure now counts the messages sent using the FCM API.
Reference: https://firebase.googleblog.com/2018/08/in-app-messaging-crashlytics.html
As you might already know, only notifications sent via the console are visible in the Firebase Console itself. In the left-side panel, just select on the Notifications and you will see the list of Notifications sent using the console.
One approach is also to make use of the Google Play Developer Console, but the app should at least be in Alpha Testing.
Kinda similar posts:
Firebase Cloud Messaging Statistics API
Firebase notification records/log API

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 Notification to the End user

App is already published on playstore, can anyone explain the proper way or channel to create and send notification to the end user? Where i can also get the info regarding how much device has received the notification and how much user have clicked on the notification and checked it?
Implement GCM(Google Cloud Messaging) in your app and end users should install your updated app (with GCM)
“Google Cloud Messaging for Android (GCM) is a service that helps developers send data from servers to their Android applications on Android devices”. Using this service you can send data to your application whenever new data is available instead of making requests to server in timely fashion. Integrating GCM in your android application enhances user experience and saves lot of battery power.
--https://developers.google.com/cloud-messaging/
GCM tutorial available in this link.
Happy coding :)

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.

Instant Messaging on Android with Google Cloud Messaging

I was just looking at the new Google Cloud Messaging (GCM) and I was wondering if it is possible to use GCM for Instant Messaging on your Android application?
I saw you can send data, like a message, from a server, but is it also possible to send from one device to another one?
And how would this work?
Some example code would be really helpful..
Tnx!
The official docs on Google Cloud Messaging for Android does mention that GCM can be used to develop an instant messaging app.
...or it could be a message containing up to 4kb of payload data (so
apps like instant messaging can consume the message directly).
So we went ahead and created an instant messaging app using GCM. The server-side is powered by Google App Engine. You can read the complete tutorial here. Create an Instant Messaging app using Google Cloud Messaging (GCM)
So it is possible to use GCM for Instant Messaging on Android, to answer your question. However, reliability of GCM compared to XMPP for IM is another topic.
Just my two cents:
I think you should not use GCM for delivering IM. You should have a dedicated server where your Android IM apps will connect to, using a persistent socket connection. Your server will know who is online or not and therefore can present an 'online list' to all the apps.
GCM can come into play, while users are offline or not running your app. A GCM message can be sent to them to indicate 'XXXX wants to chat'. They can then launch your app and automatically connects to a chat session.
Google has said that the delivery of GCM messages are not guaranteed. This reason alone is not a good idea to rely on them for Instant Messaging.
Try pub nub - it is pretty easy to implement - send Im from one mobile to another - simply fire up the web page (see link) in the browser , and chat between pc, mobile - and works - with 'no server'. Code is for javascript but they also have java. Chat app using jquerymobile web app framework
You might want to check out how a server sends a message to the GCM Service. It is possible to use php on Server side so it should be possible to adapt that to a POST request directly out of your application. However, to communicate you need the registered ids of the devices you want to send data to. Means you will need something to store and get them. Best solution would be your own (web) server which stores all ids and handles the Message sending.

Categories

Resources