Question Detail

I've always used GCM for push notifications in android apps, but for security constraint, i'm obliged to avoid GCM and use local push server, how can I send Push notification from my server without GCM?


Thread Reply

Hemant Sharma

- 1 years ago

To solve these problems, Apple, Google (and also their minor competitors) provide "notification services". They are consists of:

But when you are trying to "avoid GCM" you got all things to care for you, plus:

  1. System-wide background application ("service") which keeps the connection to Apple/Google "notifications" infrastructure servers.
  2. API for developers, to "register" their applications both on server and client side: your server-side application send all events to Apple/Google, and your client app receive "pushes" from that system service, you no need to care about network outages and battery impacts - all issues are handled by OS manufacturer.
  3. Your "handmade" persistent network service will interfere with Google's one, and will at least double network and battery usage (or even more, just because your implementation will have errors/other corner cases which are already where solved by Apple/Google big engineering teams)

  4. Your application will dramatically more complex, and you will have much more security issues (as security issues are now handled by you, too) and poor user experience (applications with "own" networking are often have bad UX design, prompting and boring end user with network error messages, for example).

Hemant Sharma

- 1 years ago

To solve these problems, Apple, Google (and also their minor competitors) provide "notification services". They are consists of:

But when you are trying to "avoid GCM" you got all things to care for you, plus:

  1. System-wide background application ("service") which keeps the connection to Apple/Google "notifications" infrastructure servers.
  2. API for developers, to "register" their applications both on server and client side: your server-side application send all events to Apple/Google, and your client app receive "pushes" from that system service, you no need to care about network outages and battery impacts - all issues are handled by OS manufacturer.
  3. Your "handmade" persistent network service will interfere with Google's one, and will at least double network and battery usage (or even more, just because your implementation will have errors/other corner cases which are already where solved by Apple/Google big engineering teams)

  4. Your application will dramatically more complex, and you will have much more security issues (as security issues are now handled by you, too) and poor user experience (applications with "own" networking are often have bad UX design, prompting and boring end user with network error messages, for example).