magirtopcu
magirtopcu

Reputation: 1194

How to Parse send push without gcm registration?

While implementing push with Parse, I didn't use anything related to Google Cloud Messaging. I didn't open Google dev console and switch on GCM messaging, also I didn't get any sender ID and I didn't register devices to obtain registration ID, however Parse could send push. I wonder Parse uses its own socket? In Parse Android source code, I couldn't catch anything related to this. Now all Parse migrating services need GCM registration ID including with Parse's own open source push backend solution. Can someone give detailed information about this?

Upvotes: 12

Views: 1103

Answers (1)

Daniele Segato
Daniele Segato

Reputation: 12899

Parse DO use GCM. They just use their own account.

You don't have to believe me, the android SDK has been made open source a while ago: https://github.com/ParsePlatform/Parse-SDK-Android

These are the class used to integrate to GCM: https://github.com/ParsePlatform/Parse-SDK-Android/blob/bdd5f50d51d30030b9df12c0e09d08d8859e64be/Parse/src/main/java/com/parse/GCMService.java https://github.com/ParsePlatform/Parse-SDK-Android/blob/e2329512e5531f0efd56671c02f476285f87386b/Parse/src/main/java/com/parse/GcmRegistrar.java https://github.com/ParsePlatform/Parse-SDK-Android/blob/bdd5f50d51d30030b9df12c0e09d08d8859e64be/Parse/src/main/java/com/parse/GcmBroadcastReceiver.java

However they have a method of supporting Push notification without GCM, it's mostly made for non-Google devices or to release the app in non Google-Play market. It's called PPNS

The switch between provider is done inside this class: https://github.com/ParsePlatform/Parse-SDK-Android/blob/bdd5f50d51d30030b9df12c0e09d08d8859e64be/Parse/src/main/java/com/parse/PushService.java

the PPNS class is supposedly handled by a class called com.parse.PPNSService which is not in the github code. It is instantiated via reflection, I'm guessing they add it later in the jar in someway and they didn't make it public. It surely would have to open and handle it's own socket.

Upvotes: 15

Related Questions