I am using https://github.com/Redth/PushSharp
Registration with GCM works fine, however if I unregister, the device still receives push notifications.
All I have done is downloaded the push sharp source from https://github.com/Redth/PushSharp, and replaced my project ID as suggested in the example solution.
Could anyone familiar with GCM please suggest if they have experience anything similar, which is after unregistering, they still receive push notification from Google, and suggest a workaround/fix.
Thanks
Your problem have two solutions :
On Unregister mark registration false for that device on your server database.Or,
unregister broadcastreceiver from your app.
Related
I have set up push notification from Firebase console and I can send push notifications. However, I cannot send device-to-device notification yet. As I gather I would need an external app server that would observe Firebase nodes for change and then would fire off a notification via FCM.
I have seen similar question in SO here and a good but brief and not so complete explanation by Frank van Puffelen here. But I am still quite confused. Any tutorial or help as to how I can set up an app server (XMPP here) that would do the communication between client app instances and Firebase for sending notification when ChildAdded or modified and handling the key exchanges would be appreciated. (as I understand, FCM needs XMPP protocol for sending upstream notification)
Any help would be appreciated.
Following this tutorial.
Send Notifications from Server
What you can do is, setup an external server using your favorite technology to listen child_added or changed and respond to the notification requests.
We used the node.js app engine to handle this. Again the funda is to move people to use other cloud paid services.
Yours it's a good question... The firebase can't send push device-to-device, then if you want to do this one, needs a app server as you said. The other possibility that I thought for a long time is a create a independent service to do two things, the first one is constantly controls events as onChildAdded, for exemple and the second one, throws local notifications.
This is solution that i think works fine before to create a app server... At final if you try to do it, explain us your experience please! Greetings!
I follow this link PLease see here . Can anyone tell me exact process to communication between two mobile devices in terms of push notification. Please help me.
GCM is a google cloud messaging http server.It is used for providing notification service on android phones any notification you receive on your phone is sent through GCM.Every device using a specific application is registered with GCM. Even if you want your application to send notification to the user on occurrence of something it's not possible without GCM.
I've been looking at notifications for an app I'm making and I'm looking for a similar functionality to the Facebook app. There you receive notifications even though you are not in the App (by receiving something via WiFi/3G).
I've noticed for example that after you restart your phone (and without opening facebook) the notifications still arrive.
It is an important part of my app because it is used to display alerts of failures on a machine.
Anyone knows how to do that or what material I should read for that?
Thank you for your time.
Google cloud messaging user notifications does this.
http://developer.android.com/google/gcm/notifications.html
Push notifications is what you're looking for.
http://developer.android.com/google/gcm/index.html
I'd go with Google Cloud Messaging. It will send broadcast to your device in which you can decide if to raise a notification or not
refer to this link :http://developer.android.com/guide/topics/ui/notifiers/notifications.html
try this out !!
Currently C2DM has moved to GCM, and i am in an starting stage in using GCM, can any one guide me what are the process to use GCM in android, how to register the device.
thanks in advance.
Check out this post. It shows the end to end process of registering your app with Google, setting up the client code, and sending notifications via GCM to your Android device.
http://fryerblog.com/post/30057483199/implementing-push-notifications-with-gcm
I have an app that currently uses C2DM for push notifications. I would like to inquire if I update the app to GCM and if some users do not upgrade their app, will Google allow me to use both the C2DM and GCM for the two versions of my app?
Or will the users on my previous app never receive a PUSH notification altough I still have the push logic implemented for C2DM?
I've completely replaced C2DM with GCM in the app, and left support for both protocols in the server side. Works like a charm; details are here.
They will still receive them as long as you don't remove any authorisation keys, ids etc. as GCM uses the Project ID while C2DM uses the registered e-mail address.
More on it here: C2DM to GCM Migration
Once the C2DM service was deprecated recently I advice you to migrate your pushes system to GCM service.
The best way to deal with it is doing the thing like Google says. Take a look at this topic in the official GCM's documentation.
While not the original question, an interesting one would be: Can one app simultaneously use C2DM and GCM.
C2DM uses the Sender-Account while GCM uses the Project-ID to register. The only thing they both might share is the App-package name (and obviously the google account of the device, but that shouldn't matter as there are multiple apps which can use gcm/c2dm in parallel anyway).
In my experience registering C2DM and GCM in the same app can cause some serious problems.
Reason to have both in one app might be that you want to use GCM in the app, but can't everywhere because a legacy backend might not be able to switch to GCM yet. Probably a rather rare scenario - but currently happening for our app.