Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Upsteam messaging #434

Open
jpuderer opened this issue Dec 17, 2015 · 9 comments
Open

Upsteam messaging #434

jpuderer opened this issue Dec 17, 2015 · 9 comments

Comments

@jpuderer
Copy link

GCM supports the ability for clients to send messages upstream to the server.

It would be nice if the Phonegap plugin implemented this. Even better if it was implemented for all of the platforms that GCM is supported on (Android and iOS).

@ffabreti
Copy link

+1
I have not seen the code, but I understand that upstream notifications need to be done via XMPP instead of HTTP.

@jpuderer
Copy link
Author

Well if you're using the Google provided GCM libraries (which I think you are), then that details of the transport likely doesn't matter. I vaguely suspect that GCM uses XMPP on the client regardless. It's only on the server where you need to use XMPP instead of HTTP.

@ffabreti
Copy link

Humm.... you may be right, and I hope you are!
this Google page says that native code should use GoogleCloudMessaging API to call gcm.send() and I don't really care what it uses behind that :) although I guess it's Google Play Service XMPP connection.

Not this same project, but looks like someone already tried at phonegap-build/PushPlugin#93

I wish I could write Java code, but I barely understand it.

@nicoabie
Copy link

Just a matter of creating a fork of this project applying that code and see what happens :)

@macdonst
Copy link
Member

Like I said, it's not a ton of code to write. I'll happily take a PR on this but I'd like someone to look at the iOS side as well.

@ffabreti
Copy link

I have forked and added the code.
Commit is here: ffabreti@37e185a

I know very little Java, and only did it because I really need the feature.
I only did Android side. Sorry.
I have tested with a GCM-XMPP-Client for Ruby and it worked.

@knvpk
Copy link

knvpk commented Aug 23, 2016

I have read the IOS docs but there is XMPP type of connection. Anyway for android it is usefull when creating the chat apps. Thanks @ffabreti for PR.

@knvpk
Copy link

knvpk commented Aug 23, 2016

Sorry, The whole APNS is XMPP server, IOS also some how have a upstream messaging want to find the docs.

@knvpk
Copy link

knvpk commented Sep 26, 2016

Is there any progress on this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

5 participants