This story was originally posted on 2/20/19
8:04 am PST February 19, 2021 and last update 2/20/20
7:56 a.m. PST on February 20, 2021.
You know you hit those notifications and nothing happens until a minute or two has passed? Twitter was guilty of this, but there are still tons of apps that exhibit this behavior. Google is looking to make this a thing of the past on Android 12, by banning apps from using notification trampolines. This should effectively ban slow loading notifications, and the change is already having an effect on apps on Android 12 today – and we’ve learned that Google apps are among the worst offenders.
Trampolines are typically used by apps that don’t open their own activity when you tap a notification, like when you share links with yourself through an app such as Pushbullet, and tap the notification to open the website instead of the app. Google also uses this method for its own “Send to your devices” feature in Chrome. To prevent users from having a bad waiting experience, Google is ready to discontinue apps that rely on this method and is already showing that the implementation will go away once Android 12 is stable. Oddly enough, Chrome’s own implementation is already completely halted (probably because of Play Seriv, while Pushbullet users only get a warning message.
In fact, Google apps are among the worst offenders when it comes to the use of trampolines. We spotted the “indirect activity” toast after tapping on notifications from several Google apps, including Drive (when launching a Docs, Sheets, or Slides via a notification), Home, and Calendar.
Left: Google Home. Middle: Google Calendar (the top part is a mockup for privacy reasons). Law: Google Sheets.
We spoke to the developers at Pushbullet, who confirmed they are using what could be considered a trampoline. However, since Pushbullet notifications are often only meant to lead you to the browser, there is no reason to start the Pushbullet app just to kill it right after redirecting users to the requested website. There may be a way around the problem by using the PendingIntent class as suggested in the Android documentation, but only rigid tests will tell. In any case, the developers have confirmed to us that they will be implementing the necessary changes to support Android in the future. Google will likely have to change the way it handles notifications in some of its apps as well.
You know how you sometimes hit a notification and nothing happens for 5 minutes and then it suddenly pops up? Twitter used to do this and other apps are still at fault today.
Android 12 wants to ban this behavior forever and prevent notifications from not directly starting activities. pic.twitter.com/QWEEMtKDUO
– Artem Russakovskii (@ArtemR) February 18, 2021
While the new requirement may make some activities more time-consuming for developers, ordinary people will likely be happy that they no longer have to wait for their phone to do something after pressing a notification.
To learn more about the launch of Android 12, see our announcement article detailing what’s new here. If you want to install Developer Preview on your own device, find out how in our Android 12 download guide.
Google apps among the worst offenders
Updated to add a few more google apps that use trampolines.