LightBlog

mercredi 16 août 2017

PSA: Broken Push Notifications? Titanium Backup may be the cause.

On XDA-Developers we are all huge fans of custom ROMs, themes, and all other sorts of modifications. Some of us switch between different custom ROMs fairly regularly, and as such use app backup solutions such as oandbackup or the popular Titanium Backup. Many users have reported issues of having broken push notifications after a clean flash or ROM switch, with WhatsApp being one of the biggest offenders. Other apps, such as Tumblr, also fall victim to not showing any push notifications. Why is this and how can you fix it?


The Problem

Android devices with Google Play Services installed are registered with the Firebase Cloud Messaging (FCM) service, previously known as Google Cloud Messaging (GCM). What this does is calculate a unique device token for you, then when you install an FCM-enabled app (such as WhatsApp) it registers with the FCM Push service so it can send you push notifications. Your device can then be woken up while it is in Doze mode whenever a high priority FCM notification is pushed to your device. High priority FCM notifications include the likes of WhatsApp and other instant messaging applications, for instance. If, however, you wipe the system when installing a new ROM onto your device, your phone will register a new FCM token, and any apps you restore with data won’t be able to push FCM notifications anymore, as they are still using the old token.

But what if your phone doesn’t have Google Play Services installed? How do you receive notifications? Well, FCM enabled apps will generally have their own push notification service as a fallback. For instance, Facebook Messenger uses a service called FBNS, which it defaults to when Google Play Services isn’t detected. This can be seen in the screenshot to the side under the “Push Notification” section hidden away in the internals of Facebook Messenger. I believe some apps detect when FCM doesn’t work and fall back to their own service when FCM breaks, but obviously not every app does this.


Solving Broken Push Notifications

The simplest way to avoid running into issues is installing apps normally instead of  restoring through Titanium Backup (or your other backup service of choice) after a clean flash or a ROM switch. This can be painstaking for some apps, but many such as WhatsApp allow you to backup your chats within the app anyways. Other apps such as Tumblr contain all their data in the cloud, so there is no reason to restore those. If you have issues with push notifications and have used a backup service to restore your apps, try and reinstall them through the Play Store. Any issue with push notifications I personally have had have been fixed by reinstalling the app through normal means (either by Play Store or directly through an APK), so give it a try and I hope it fixes your broken push notifications!


Suggested Read: Silence Annoying Work Emails Automatically with Quiet for Gmail



from xda-developers http://ift.tt/2x5cqMb
via IFTTT

Aucun commentaire:

Enregistrer un commentaire