To get started, you need to install a Foldable emulator to run this demo project. In this project, you have used Microsoft’s Surface Duo 2 emulator. So you will cover how to install and run the Foldable emulator on your Android Studio in this section.
You can also follow in the instructions below:
You can download the Surface Duo emulator image from the Microsoft Download Center. If you click the Download button on the page, you can choose download options as in the following image:
After downloading the emulator, you can follow the instructions below to install it on your PC:
- Open the SurfaceDuoEmulator.dmg file.
- Copy the .jar file and the contents of the emulator folder to a new location on your local hard drive. (The emulator folder name cannot have periods in it).
- Navigate to the SurfaceDuoEmulator folder where you copied the emulator files. -Run the ./run.sh by double-clicking or you can type it on the terminal to start the installation process. This can take some time - but at the end of the process, you will see the emulator launch.
- Unzip the downloaded file.
- Launch the installer.
- After completing the SDK setup, launch the Surface Duo Emulator via the start menu link.
Note: If the emulator does not start, you might need to check out update the pointer to your Android SDK installation.
After running the Surface Duo 2 Emulator, you'll see the result below on your PC:
Then the Surface Duo 2 emulator will automatically appear in the Android Studio available device list like the image below, you can run this demo project on your Duo 2 emulator:
Next, run this demo project, and you'll see the result below:
In addition, you can control the folding state and degree of the device on the Virtual sensors tab on the emulator controller like the result below:
Now you can build projects for responsive UIs on the Surface Duo 2 emulator.
Copyright 2022 Stream.IO, Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.