Updated Microsoft Surface Duo emulator with posture support

Emilian Mihalache

Emilian

Hello Surface Duo developers!

I’m excited to announce our latest Surface Duo Android emulator update, now with an easier way to simulate and visualize different device postures.

You can download the latest version from the Microsoft Download Center (follow these instructions). The posture updates work with the Google emulator version 30.2.* or newer, which comes with Android Studio 4.1 (currently the latest stable release).

New features and fixes

This emulator release includes the following updates:

  • Updating the hinge angle also affects the emulator’s posture.
  • 3D device posture view in the Extended controls window.
  • Rotation works – fixes this troubleshooting item (don’t forget to enable Auto-rotate from Android’s “quick settings” menu).
  • Surface Duo-related updates since the last emulator release.
  • Added wipe-data start option.

Hinge angle and posture buttons

The posture buttons are now available on the emulator toolbar – long-click on the current posture to switch to a different posture:

Figure 1: Surface Duo emulator toolbar

In the Extended controls window you can also choose a posture (closed, flipped, half-open, open, tent), or select a specific hinge angle (0-360 degrees):

Figure 2: Surface Duo emulator extended controls window

Device pose

This screencast shows the Hinge angle sample running on the simulator while adjusting the posture:

Animation of 3D emulator posture adjustment
Figure 3: Screencast of hinge angle sample running on Surface Duo emulator demonstrating changes in device posture

When the hinge angle exceeds 235 degrees, the emulator will switch to single-screen (as it would on a real device) and you can double-tap to switch the active screen.

Known issues

Current posture mapping is slightly inexact. That’s why you might notice that when using the Open posture, the emulator sets the hinge angle to 240 degrees instead of the expected 180. This is due to the way in which the default angle for each posture is calculated internally and it is definitely something we’re looking to fix in a future release.

Using the hinge angle slider should, in all cases, get the Surface Duo emulator OS to update its internal posture representation. This is true even for sub-postures that are not currently available as ‘quick jumps’ from the Posture button UI. For example, try setting the hinge angle to something less than 75 degrees while the screen is off and check out Peek mode.

Resources and feedback

Visit the release notes for information about this and future updates.

The Surface Duo Developer Experience Team would love to hear your thoughts on the emulator, the SDK, which tools are your favorite, and what helpers or controls you’d like us to work on next. Please reach out on the feedback forum or via Twitter or GitHub.

0 comments

Leave a comment