Android 14 is upgrading the back gesture in a big way. Here’s how the new predictive back gesture works and what it’ll look like.
When you swipe to go back in any Android app, it isn’t always obvious what screen will appear next. If the screen that you see next is what you expect to see, then there’s no problem. If you inadvertently exit the app by swiping back, you could lose your position or progress when doing something, though that’s less likely to happen now due to changes in Android 12. Either way, accidentally exiting an app messes with the metrics that developers collect to better understand their users, which is why Google has been working on a new predictive back gesture model that gives the user a visual cue about where the back gesture will take them.
As you navigate through apps, Android keeps a record of destinations you go through called the back stack. This is so the system will take you to the correct destination when you swipe to go back. Before Android 13, however, the system had no way of knowing for sure where a back gesture would take the user. That’s because apps could implement their own back behavior and create their own back stacks that the system wouldn’t be aware of. Since the system itself wasn’t certain what would happen when you swipe to go back, it couldn’t inform you what would happen either.
Starting in Android 13, however, apps can tell the system in advance whether they handle back events or not. This new ahead of time model lets the system know if a back gesture should navigate to the previous task in an app’s back stack or return to the home screen. Knowing where to go makes it possible for the system to play a transition animation that acts as a visual cue for the user that tells them what’s going to happen when they swipe to go back.
The predictive back gesture model was only partially implemented in Android 13, however. Google added a new “back to home” transition animation that plays out when the system knows that a back gesture will return the user to the home screen, but they weren’t able to add an animation for when the user navigates up an app’s back stack. In other words, the predictive back gesture in Android 13 could only tell the user whether the back gesture would exit the app back to the home screen but not anywhere else.
Starting in Android 14, however, the predictive back gesture can show a preview of the previous task that’ll be popped out of the back stack when the user is swiping to go back. This means you’ll be able to tell whether the back gesture will take you back to the home screen, to a previous page in the app, or to another app entirely, so there won’t be any ambiguity about what’ll happen when you perform the back gesture. Here’s a demonstration of this new behavior:
If you install Android 14 DP1 on your Pixel device, you won’t see this new behavior just yet. That’s because the new transition animation is disabled by default in DP1, so I had to flip a developer flag to enable it. I also still had to enable the predictive back animation setting in Developer Options, and I also had to use an app that opts in to the new predictive back gesture behavior.
The new predictive back behavior will be enabled by default for apps targeting API level 34, so I expect the “Predictive back animations” setting to be enabled by default and eventually removed from Developer Options in future releases. I think you won’t have to wait too long before you start seeing this new behavior in apps, especially because Google is warning developers that back navigation will be broken in their apps if they don’t support this feature when it’s enforced. Developers who have yet to add support for the predictive back gesture should read up on Google’s documentation on the feature.