
The 5G network setting can be accessed in the Android Emulator’s Cellular controlsĬheck out our 5G documentation to learn more about adding 5G capabilities to your app. Adding the following code to a Pixel 3’s config.ini file allows you to see what it would look like with a horizontal fold! A virtual device’s config.ini file can be found by right clicking the device in the Android Virtual Device (AVD) Manager in Android Studio and selecting “Show on Disk”. This makes it possible to emulate any foldable device on the market or even configurations that don’t yet exist. Until then, or afterwards if you would like to customize your virtual device, foldable properties can be added or modified by editing a virtual device’s config.ini file. If that’s not enough, look out for more content in the 9th week of 11 Weeks of Android: Android Beyond Phones.Īlongside the visualization and extended controls, we are expanding upon the two initial foldable hardware profiles and will be releasing profiles that feature horizontal folds and dual displays alongside Android Studio 4.2. If you want to learn more about this library and building for foldables, read Building apps for foldables or Support New Form Factors with the New Jetpack WindowManager Library. In the example above, the Android Sunflower sample app has been modified to split into a parent child layout along the device’s hinge when the posture is HALF_OPENED, using the hardware to support novel UX. With these controls, you can explicitly set the WindowManager’s DeviceState and test your app’s reaction.


This feature takes advantage of the flexibility of the Android Emulator and hooks directly into the WindowManager, a recent addition to Android Jetpack that makes it possible for developers to build consistent experiences that react to the posture of foldable devices. Using the Emulator to build an interface that splits into a parent child layout when the device’s state is HALF_OPENED and returns to normal when the state is OPENED.
