lundi 20 août 2018

Android Pie opens up recent apps customization for third-party launchers

Android Pie recent apps

Until Android 9 Pie, Android’s stacked card recent apps interface remained largely unchanged since it was first introduced in Android 5.0 Lollipop. With the introduction of gesture navigation in Android Pie, Google revamped the recent apps overview screen. The new interface features large overview cards arranged horizontally, but that isn’t the biggest change to the recent apps interface. Since the code for recent apps is now integrated into the stock launcher, you can now seamlessly transition from your recent apps overview to your launcher’s app drawer. As AndroidCentral’s Ara Wagoner explains, this puts third-party launchers at a disadvantage because only the pre-installed system launcher can integrate with the recent apps UI. On the other hand, if you have root access, Android Pie’s changes to the recent apps overview actually opens up a whole new avenue of customization.

Customizing the Recent Apps Overview before Android Pie

Before Android 9 Pie, the multitasking interface was handled entirely by the SystemUI package. Thus, the only way to customize the recent apps screen was to modify SystemUI. That wasn’t a problem for custom ROMs, but it was far trickier for those who only had root access. In that case, the only options would be to either use a Magisk Module that replaces the SystemUI entirely or use an Xposed Module to replace the code that handles the recent apps UI. Both options were flawed, unfortunately, because any such modification would be OEM-specific and would easily break with any given update. It would be a nightmare for a developer to maintain a recent apps switcher mod for more than a handful of devices. However, if a developer no longer needs to worry about modifying SystemUI or other system apps, then it’ll be easier to build custom recent app switchers. Android Pie should make that kind of customization a reality.

Customizing the Recent Apps Overview in Android Pie

Contrary to what you may have heard, the new Android Pie recent apps UI isn’t a Pixel Launcher feature. The Pixel Launcher is the pre-installed launcher on the Google Pixel and Google Pixel 2, so it just happens to be responsible for handling the recent apps overview on those smartphones. On other phones like the Essential Phone, the pre-installed launcher also integrates with the recent apps UI. As shown on the OnePlus 6, OEMs can even customize what the recent apps screen looks like. Now that the source code for the updated AOSP Launcher is available, we can see exactly how the new recent apps interface integrates with the launcher. We initially believed that third-party launchers would need to be bundled into a custom ROM to take advantage of the new recent apps integration, but it turns out that’s not the case.

The developers of Lawnchair launcher, a popular Pixel Launcher alternative, integrated the code for handling the recent apps into their app. They then figured out the steps needed to get their launcher to be recognized as the default handler for the recent apps overview. That made it possible to use Lawnchair and not the Pixel Launcher as the default launcher on the Pixel 2 without losing the horizontal app switcher or swipe-up app drawer. We demonstrated this in the following video recorded on the Google Pixel 2 XL running a stock, rooted build Android 9 Pie.

How did the Lawnchair team do it? Well, I was asked not to share how they did it just yet, but getting the app the right permissions to be recognized by the system was surprisingly simple. Their method to do so is still a work-in-progress, though, so it’s not ready to be shared with the world. (The Magisk Module they made didn’t work, so I had to manually place the right files in the right place and then run a command.) That’s also why the recent apps screen looks identical to that of stock Android 9 Pie—they haven’t gotten around to customizing it. But the developers of Lawnchair have at least shown that it’s possible to implement the new recent apps UI in a third-party launcher. The next step is to customize it like OnePlus did on the OnePlus 6. Once the developers of Lawnchair have something closer to release, we’ll let you all know.



from xda-developers https://ift.tt/2MmMQOP
via IFTTT

Aucun commentaire:

Enregistrer un commentaire