Tuesday 4 May 2021

Here’s why Nova Launcher works better on Google Pixel phones

In the past, third-party launcher apps often provided a superior experience to the stock launcher found on most Android phones. With the revamp of the recent apps screen and the introduction of gestures in Android 9 Pie, though, third-party launchers were put at a disadvantage as these new experiences were integrated into the stock launcher app. Over time, Google has tried to make the third-party launcher experience not so terrible when using gestures, and they’ve actually started to succeed at this recently.

If you’ve used a recent Nova Launcher beta release on a Google Pixel phone in the last few months, you might have noticed the fluid animations when using gesture navigation. Unfortunately, you won’t see these same animations when using Nova Launcher on any other device, at least for now. To understand why we first need to briefly explain what separates third-party launchers like Nova Launcher from stock launchers like Google’s Pixel Launcher.

Google first introduced gesture navigation in Android 9 Pie. In order to make gestures feel as fluid as possible, Google needed to make app transitions look seamless. They also wanted to let users access their entire app list from the recent apps screen. To do both of these, Google decided to move the code that handles the recent apps screen from Android’s SystemUI to Launcher3, Android’s open-source launcher app that most OEM stock launchers are forked from. Thus, the QuickStep component was born, and because of its privileged nature, Android only allows the preinstalled launcher app to be set as the recent apps provider. This can be overridden with root access if the third-party launcher supports it, but for most users, this means that a third-party launcher app will always rely on the stock launcher to handle gestures and the recent apps screen. The result, as most of you have probably experienced, can be a bit janky, with transitions that don’t look fluid and seamless. Unless you use a Google Pixel phone, that is.

Android 10 gestures

On most Google Pixel phones, there exists an API that third-party launchers can use to make the transition from an app back to the home screen look much more native. Some third-party launcher apps like Niagara Launcher and the aforementioned Nova Launcher are taking advantage of this API, though the latter only includes it in its in-development v7 builds. When this API is used, the third-party launcher app receives an intent and a callback from QuickStep whenever the user performs a swipe to go home gesture. The third-party launcher can then hint to the gesture system how to animate the window as it minimizes onto an app icon.

Here’s an example of what this looks like in Niagara Launcher, courtesy of the launcher’s developer 8bitpit:

And here’s a comparison that shows what the animation looks like on an ASUS ROG Phone 5 and Google Pixel 4, both running Nova Launcher v7.0.25 (the latest beta release at the time of publication) and Android 11:

Now you might be wondering: Is this API exclusive to Google Pixel phones? The answer is no, it isn’t. The API is part of Launcher3/QuickStep and can be found in AOSP, meaning it’s open to any OEM launcher app. While the API was committed to Launcher3 internally on July 21, 2020, it seems it was merged into the AOSP master branch with the Android R QPR1 release in December.

The API that makes Nova Launcher and Niagara Launcher feel more native on Google Pixel phones.

Kevin Barry, the developer of Nova Launcher and one of the first to spot this API, told us that he suspects part of the reason why OEMs aren’t using this API in their forks of Launcher3 is that it came a bit late in Android 11’s release cycle. It takes quite a bit of effort to merge big AOSP changes, and the Android R QPR1 update definitely contained a lot of those. In years past, we’d call these code drops a “maintenance release”, but Google doesn’t really do those anymore after pushback from OEMs (or so I’ve heard). This is why LineageOS, the popular Android custom ROM, calls its latest release “LineageOS 18.1” rather than “LineageOS 18” to signify that the ROM is based on top of the latest Android 11 codebase rather than the initial Android 11 release.

It’s also worth noting that this API is only accessible on Google Pixel phones after the December Pixel Feature Drop, which coincides with the public Android R QPR1 release. And despite the Pixel 2 getting its final update in December, that update didn’t include the Android R QPR1 codebase, which is why Pixel 2 owners running Nova Launcher v7 don’t have the same experience as other Pixels. (Pixel 2 owners can sideload a newer version of the Pixel Launcher which has the API from a more recent Pixel device, but user reports indicate the animation is still buggy even if it works once in a while. As a reminder, Pixel Launcher is built on top of Launcher3 just like most stock launchers are, but it also includes some Pixel-exclusive features.)

So what will it take for this API to be added to other Android devices? Unfortunately, there’s no easy answer to that, because we don’t know exactly how each OEM develops its launcher app. Given how tightly Google controls full-screen gesture navigation, we suspect that most OEMs don’t heavily modify code related to gestures and/or QuickStep. Unless an OEM goes out of its way to revert the commit, break the code, or refuse to update Launcher3, then we should see this API get added to OEM launchers whenever they rebase on top of the upcoming Android 12 release. In fact, one OEM we talked to, ASUS, told us that they plan to bring this API in their Android 12 update. We don’t know if Google has communicated this change to OEMs, but we hope that more OEMs take notice of this change and decide to incorporate the API in their forks of Launcher3 to improve the experience of using third-party launchers.

The work won’t end there, however. Even after including this API, there’s still more work that needs to be done to achieve parity between third-party launchers and OEM launchers. For instance, some OEM devices flicker when the user taps the screen before an animation to the home screen comes up. Sometimes, the system launcher app appears instead of the selected third-party launcher app (I’ve had this happen to me a few times). An improved transition animation is nice, but nobody wants to deal with bugs in either the launcher app or the recent apps screen, so gesture code stills needs some cleanup and/or standardization.

Thanks to Kevin Barry and Peter Huber for their assistance in this article!

The post Here’s why Nova Launcher works better on Google Pixel phones appeared first on xda-developers.



from xda-developers https://ift.tt/3h066iW
via IFTTT

No comments:

Post a Comment