Is it possible to simulate a smartphone on a PC for development and debugging

Good afternoon.

I started studying kivy and found that I couldn't test some features on my computer beforehand.

Every time you have to build an apk file, upload it to your phone, install it and check it there. If the written code needs to be debugged, then it generally turns into a nightmare.

Now this happens mainly when I write code related to geolocation, but I suspect that in the future I will want to use more and a gyroscopic sensor and some other smartphone-specific things.

Is it possible to simulate all these sensors on a computer so that you can debug without dancing with a tambourine?

Author: Xander, 2017-06-27

2 answers

In fact, most normal sensors can be simulated on an emulator. Even the fingerprint sensor.

If the virtual device does not support their emulation, then you can install SensorEmulator and get what you want...

On the other hand, of course, a physical device is always better than a virtual one. Moreover, some physical devices are able to emulate changes in the readings of their sensors - for example, to simulate the location (almost all Samsung ' s there are such developer features).

Update

The Android Studio package includes the so-called Android Virtual Device Manager - read more here

There are also third-party developments, the most famous is Geny Motion - which is based on Oracle VirtualBox

A more or less standard development pattern is when testing is first performed on a virtual device and only then on physical devices.

 2
Author: Barmaley, 2017-06-27 10:01:22

Yes, you can, you need any android emulator for your PC. They are all free and all allow emulation of various sensors and GPS. Installing apk files on them can be done either through the command-line utility (or via the IDE), or by simply dragging the apk file.

The most popular is probably Android Virtual Devices it comes with the Android SDK (or with Android Studio). You can read about it here. Unfortunately recently standalone installation has become more complicated and easier download the bundle from the emulator, studio, and SDK.

For a long time, Genymotion was popular -- the first mass-produced x86 emulator. It used to have an infinite free trial for non-commercial use. There is a standalone installation, requires the presence of virtualbox.

If you really need Hyper-V for some reason, then none of the above options will work, but the Android emulator for Visual Stuido will work. It can be installed together with the free version Community version of the IDE, read more about it here.

Now there is not much difference in capabilities and performance, but keep in mind that the last two emulators use images with x86 architecture, so if you use C / C++ libraries in your development (this is unlikely, unless you have video/image processing), then you will need the x86 version of the library for the emulator and the ARM version for real devices, or look for an ARM to x86 translator for a specific emulator.

 1
Author: Agrgg, 2017-06-28 15:40:31