What is Google Push Service: The Essentials

emteria-notifications

Want to keep your app users engaged, so you need a way to keep them informed and up to date? This is typically done using push notifications, which send information and news to the user even when their device or app isn't “awake”. 

But implementing push notifications for your app requires maintaining a constant connection to a server, draining the battery of the device running your app. And you need a reliable server to manage the notifications. Google offers a service to send push notifications to devices - Firebase Cloud Messaging (FCM). 

But what is Google Push Service? And is the service suited to your needs?

The Google Push Service is proprietary to Google, which means you relinquish some control of your apps to Google. And all traffic runs through Google's servers, which could cause privacy concerns. 

In this article, we're going to look at what is Google Push Service, what is Google Push Service Android, how these services work, what other options exist as a Google Android push notification service, and how to implement them in your apps and on your devices. 

What is a push notification on Android? 

Android push notifications are messages that get sent to an Android device from a server, and which the device receives instantly. There are many notification types, such as transactional, marketing, and informational notifications. Google Push Services allow you to send and receive push notifications. 

Google push notification service Android—how it works

Push notifications were first introduced in 2009 by Apple. After that, Google launched its Google Push Service in 2010, called Google Cloud to Device Messaging (C2DM). In the same year, Blackberry and Microsoft Windows also added support for push services. 

Back then, the Google Push Service was dedicated solely to Android devices and apps. But Google has since modified its offering so that multiple platforms can use the Google Push Service. 

What is Google Push Service Android?What is Google Push Service Android?

The answer to "What is Google Push Notification Service?" is simple: It's the service that pushes messages to subscribers so that users can be notified of information in real-time. The subscriber can be an Android device, iOS device, or a web browser. 

So much for what is push service on Google, let’s take a look at the whole backend behind it. The service that developers use to manage the sending and receiving of these messages is called Firebase Cloud Messaging (FCM)

FCM is the backend to manage the entire messaging workflow. But the Firebase app development platform is more, it contains an entire framework of software development kits (SDKs) combined with the infrastructure needed to develop apps and games.

What is a mobile push notification?

A mobile push notification is a push notification sent to a mobile device. Desktop devices can also receive push notifications through their browsers. 

Different types of push notifications

Several types of notifications exist on devices. These notifications can help users stay on track of orders or events that will affect their daily schedule. They also help keep users engaged in an app. 

From an enterprise perspective, notifications are important for keeping employees informed of company-specific news, urgent changes, and other industry-specific information. IT employees might receive push notifications when a client system starts malfunctioning or when an IoT device registers an anomaly. 

Firebase Cloud Messaging push notifications

Firebase Cloud Messaging (FCM) is the Google Push Service solution that first or third-party application developers can use to easily send notifications to end users' devices. 

Using Google's services is easier than to develop your own solution, including the provision of a connection server, a trusted environment with an application server and cloud functionality, and a client application. It is convenient, but not the only advantage, that Google offers a ready to use cross-platform messaging solution to send out push notifications.

Firebase Cloud Messaging is part of the Firebase platform. The platform provides several additional products to automate backend development, of which sending push notifications is one.

What is registration for Google Push Service?

When using FCM to send push notifications, you need to register a device to receive notifications from the Google Push Service. The way this is done depends on the platform you're programming on, such as iOS, Android, C++, and so forth. 

We won't get into the full technical details of how to register for the Google Push Service, but here's an overview: 

When an app first starts up, the FCM SDK generates a registration token for that app instance. All requests to the Google Push Service must include this token. In your code, you need to save this token with a timestamp on your app server. You need to periodically update the registration token, specifically:

  • When the app is restored to a new device
  • Whenever the user reinstalls the app
  • Whenever the user cleans the app data

If a token becomes inactive, it's recommended to clean up that stale token from your app server.

Turn on notifications on smartphone

What is Google Push Service—pros and cons

There are both pros and cons to using Google Push Service. 

Pros of Google Push Service

If you want to implement your own push service, you need to have a server that receives and sends messages. And you need to design your app so that it constantly remains connected to that server. 

Source: cottonbro studio / Pexels

This very quickly drains the battery power of devices running your app. It's also not guaranteed to work because Android devices have become ever more aggressive at putting apps to sleep when they aren't active. It's possible to prevent an app from going to sleep by changing many different settings on the device. This is a hassle in itself and often not feasible if you don’t have access to the device in the first place. 

Even if you have access to the device, imagine doing this in an enterprise context, where fleets can be made up of thousands of devices. Manually configuring every app on every device to remain awake would be a nightmare, even if you use some form of MDM Service (Mobile Device Management). 

The Google Push Service addresses this easily through the push notifications Firebase Cloud Messaging (FCM) implementation. Google Play Service acts as a distributor app which is always running in the background of the device listening for communication from the server. The FCM server sends messages to Google Play Services which, in turn, sends the received messages to the respective app the message is intended for. 

In essence, Google Play Services wakes the other app up, and the app can then show the message to the user or take some other action. 

This means that only a single app—Google Play Services—needs to stay awake to handle messages for all apps which saves the devices' battery power. 

Cons of Google Push Service

Google Push Service works entirely on Google's servers. This poses several privacy concerns, especially for countries with more restrictive privacy regulations, such as Germany. 

But there's another major problem with Google Push Service: You have to have a GMS-licensed Android version on your device to use FCM, because you need Google Play Services to enable Google's Push Service. 

A licensed device refers to GMS Licensing—Google Mobile Service Licensing. A GMS license lets you run Google-specific apps on the device such as the Google Play Store and Google Play Services. It also lets you run Google-specific APIs which are required for using the Google Push Service through FCM. 

This might not be a big issue for consumer devices such as smartphones or tablets since they mostly run licensed Android versions. But many enterprise devices don't run on licensed Android operating systems

These enterprise devices run customized versions of Android on off-the-shelf or custom hardware, often including specific company requirements. This is possible due to the open-source license of Android, but Google doesn't easily give its stamp of approval—the GMS license—for these devices. As a result, you can't get GMS apps on them. 

That immediately makes it impossible to use the official Google Push Service through FCM. This makes the lives of device providers running their custom Android on industrial-grade hardware and providing specific apps on their devices way harder. They miss out on an easy way to send notifications without killing their devices' batteries, but also on the simple way of providing such apps via the Google Play Store in the first place.

Costs—the two-edged sword

The Firebase pricing is both a pro and a con. FCM itself is free, thereby saving you the costs and resources of building something yourself. But the messaging service has a fee, and this can lead to unexpected high costs as your app scales. Keep that in mind!

Notification bubble: Alternatives to Google's FCM

Alternatives to Google Push Service

Good news for cost savers and enterprise device builders alike: Several FCM alternatives exist for implementing Android push messages that don't depend on Google's proprietary Push Service.  

UnifiedPush by F-Droid

UnifiedPush is an open-source, decentralized protocol to enable push notifications. It was developed by the same team that developed F-Droid, an open-source marketplace for Android applications. 

UnifiedPush lets you implement push alerts without being tied to a single company, whether Google or anyone else. You can implement it with your own push server in the back-end, or with an existing push server. It even lets you use Google's Push Service if you want to. 

MDM solution by emteria

Emteria's enterprise-ready version of Android—emteria.OS— has the ability to receive push notifications. Emteria.OS comes with a native MDM app. This management service lets you connect the emteria.OS device to emteria's Device Hub

The permanent server connection of the Device Hub lets you enjoy all the benefits of MDM for your fleet of Android devices, including push notifications. You can send all manner of messages to your devices, or to a subset of devices, through the Device Hub browser-based interface. 

WebPush

WebPush is an open standard for push notifications that use servers provided by browser vendors. These notifications are tied to the browser on the user's device so aren't a full-fledged notifications solution, but they can be used to send notifications to the users browser. When the user clicks the notification, they get sent to a webpage with details. 

This is a limited option to the full functionality of Google Push Services but is an option for companies that want to get something up quick. 

Other alternatives to FCM

Several other FCM alternatives exist to Google. To learn more about them, check out our article on alternatives to Firebase Cloud Messaging. 

Best practices for push notifications

Consumer push notifications are quite different from enterprise ones. Consumer apps have all sorts of notifications, and often too many of them. In fact, notifications on consumer devices have become so annoying that Google now switches them off by default as of Android 13

How to enable push notifications as of Android 13 requires the user to explicitly click "Allow" when an app wants to send notifications. 

Notifications in an enterprise context are a little different. Devices such as Point of Sale devices, interactive Kiosks, and other custom Android devices need specific notifications that are helpful to business operations. 

Here are our best practices for shipping Android notifications in an enterprise context:

Enable privacy

Be mindful of revealing private information on professional devices. These devices are typically used by many different people, so it is even more important to prevent private data from being leaked in a notification. This is especially true of public customer-facing devices. 

In a professional context, you should avoid revealing sensitive information on a locked device. You can set if a notification should appear on a locked screen. 

Add action buttons

Android lets you implement up to three action buttons in a notification. This lets users take action without needing to open the app associated with the notification. 

One important action could be to Snooze the notification. If the user is very busy at the time, the snooze function would let them give attention to the notification later. 

Visit developer.android.com to see an example of a notification featuring one action buttons in Figure 3.

Other actions could include:

  • Composing a reply
  • Answering Yes or No
  • Sending a message

Add a direct reply

Users can also reply directly in Android notifications. This means they don't have to switch to another app but simply type in their reply text and then hit send. 

Visit developer.android.com to see an example of how tapping the "Reply" button initiates the text input in Figure 4.

Use high-priority notifications where necessary

The higher the priority, the more a device reacts to a notification, such as ringing or vibrating. For urgent notifications, use the highest priority available. 

Notification bubble: Implement notifications easily with emteria.OS

Implement notifications easily with emteria.OS

Emteria.OS is a version of Android that runs on a wide variety of devices. It is enterprise-ready, and has built-in MDM functionality that lets you send push notifications easily through emteria's browser-based Device Hub

For companies running devices that don't have a GMS license, emteria.OS provides a simple solution that can be implemented without fuss, and that follows all the necessary privacy guidelines. 

Build unique Android products, implement push notifications

See why emteria is the chosen Android™ customization & management platform for product builders — build Android products based on your requirements with push notifications easily enabled.

Book live demo
FCM-alternatives-blog

Table of contents

emteria Demo
See emteria in action