How to run Viber on Visual Studio Emulator for Android

1124-how_to_run_viber_on_visual_studio_emulator_for_android_s.jpg

Recently I needed to set up a Viber app for the phone number that is not used on a smartphone. Obviously, Viber could be installed as a desktop app but it still requires an app on a mobile device for the same number. The same is true for WhatsApp and some other messengers.

Scenario

Let’s consider Windows 10 (build 1803) with installed Hyper-V role. A user needs Viber and WhatsApp applications and could be able to access emulated device. Also, a user is not a mobile developer so it is necessary just emulate mobile phone without digging too deep inside development stuff.

As Android Studio emulator couldn’t be used along with Hyper-V role, Microsoft proposes to use Visual Studio emulator for Android that could be installed as a standalone application. Then required apps will be installed and the emulator will be run by a startup script.

 

Mobile Development Solutions for Your Next-Gen Apps Unlock the potential of your business with Svitla Systems’ innovative mobile development expertise and tailored solutions. Get a Consultation

Solution

Applications

Find and download apk files for required applications:

  • download apk file for Viber;
  • download apk file for WhatsApp.

SDK tools

The emulator has its own device images but requires adb.exe to install applications.

Download and extract Android command line tools to a folder which path doesn’t include spaces, for example, %ProgramData%\Android\sdk. By using sdkmanager  install platform-tools:

"%ProgramData%\Android\sdk\tools\bin\sdkmanager" "platform-tools"Code language: JSON / JSON with Comments (json)

FAQ

Can I use Visual Studio Code in Android?

No, Visual Studio Code cannot natively run on Android as a full IDE. Visual Studio Emulator for Android can be used on Windows with Hyper‑V to emulate an Android device. Therefore, this makes it possible to run applications like Viber or WhatsApp just by installing the APKs, even if you do not actually have a smartphone. In brief, it’s not something that runs directly on Android, but an emulator by Microsoft, so you can set up and handle Android applications from your computer.

How to install Android SDK in Visual Studio?

To add the Android SDK, first install the Android command-line tools and place them in a folder without spaces in its path (for example, %ProgramData%\Android\sdk). Then use sdkmanager under the tools\bin directory to fetch items like platform-tools. After that is set up, Visual Studio will be able to make use of these tools, plus emulator images for running and handling Android apps.

How much RAM do I need for Android Studio emulator?

The Android Studio emulator is resource-hungry and needs a good amount of RAM to make it run well. By 2025, 8 GB of RAM will be required. However, this is only the minimum standard for elementary use and will run slowly. To get a smooth and stable experience, use 16 GB, as this is the recommended amount. Heavy workloads such as game development or perhaps even running several emulators may require 32 GB or more< an SSD and a strong CPU also help the emulator to run better (GM Tech Studio).

What is the difference between a simulator and an emulator in Android?

Emulators and simulators are virtual environments. Emulators copy both the hardware and software of a real Android device so that one can test aspects as diverse as sensors or CPU performance. An emulator runs at full speed, while a simulator, which copies only the behavioral aspects of an Android device, is usually faster and lighter but not as precise for features dependent upon hardware. Generally speaking, emulators are better tools for dealing with complex issues concerning debugging, while simulators perform more valid tests dealing with UI/UX.

Should I use Android Studio or VS Code?

Android Studio and VS Code have their distinct merits. In this case, Android Studio stands as the official IDE for Android application development and carries built-in mighty tools like an emulator, layout editors, and advanced debugging, so it’s recommended for serious Android projects. On the other hand, if you are not interested and thrilled with the weight and the slow functioning of the Android Studio then you can fall for the VS Code since it is light in the weight quick to run, and further, you can customize it with your preference with the help of extensions which will be really helpful and a good sign if you are having a low hardware configuration system.