Since there is already support for third party Android emulators (Genymotion)
could you also add support for Microsoft's one.
It is a viable option when developing on a Windows machine since it is a way snappier than the stock Android emulator and has functionallity which is available only in the paid version of Genymotion.
Even if users do not have Visual Studio 2015 on their machines, they can install the emulator separately.
Currently the integration with {N} actually works out of the box - I tried the build, run and livesync commands and they are fine.
What I would like to see is a command which starts the Visual Studio Emulator, something like
$ tns run android --emulator --vs DEVICE_NAME
Also running tns device results in the following:
1: 'undefined' Android 169.254.190.187:5555
The device name should be displayed correctly and maybe an identifier to easily recognize this device as a Visual Studio Emulator.
Hi @tsvetan-ganev,
Can you get your hands dirty with our code and send us a PR implementing this functionality? The meat of the code is in https://github.com/telerik/mobile-cli-lib/blob/master/mobile/android/android-emulator-services.ts and we have a contributor's guide here
@teobugslayer, I can't promise that I will do this quick enough, since I won't have much free time the following two weeks and I am not proficient in TypeScript.
However, I can share some commands, which I hope will help in solving the issue.
emulatorcmd list /sku:Android /type:device /state:installed /noheader /batch
61B433CF-8C92-4CEA-9CA1-009DC946ED7E 5.7" Lollipop (5.0) XHDPI Phone 1.0.50806.1
750E474F-A8AE-4757-BB0F-FE32118D868A 4.5" Lollipop (5.0) XHDPI Phone 1.0.50806.1
emulatorcmd launch /sku:Android /id:750E474F-A8AE-4757-BB0F-FE32118D868A
The emulatorcmd command resides in C:\Program Files (x86)\Microsoft Emulator Manager\1.0. It should be added to PATH in order to be run from any folder.
adb devices -l produces the following output when there is a Visual Studio emulator running:
169.254.190.187:5555 device product:VS Emulator 4.5" Lollipop (5.0) XHDPI Phone model:4_5__Lollipop__5_0__XHDPI_Phone device:donatello
Hi @tsvetan-ganev ,
Thank you for the input, it's really valuable and we'll make sure to use it once we add the support for Visual Studio Emulators.
Btw you can try deploying directly, as adb devices does not make any difference between emulators and devices. So I suggest you to use:
tns run android --device 169.254.190.187:5555
Can you share if this approach works for you?
@rosen-vladimirov, yes, this approach works once the emulator has already been started.
What I can't currently do is start the emulator via the NativeScript CLI.
I'm closing this for now due to low interest from the community.
How to run NativeScript app in Windows using Visual Studio Emulator? trying to get this project:
https://github.com/avatsaev/nativescript-master-detail-angular2
to run in Windows 10 64bit visual studio emulator but always android emulator is launching instead when running:
tns livesync android --emulator --watch
regards
Sean
nativescript
this is my adb devices:
List of devices attached
169.254.138.177:5555 device
tns run android --device 169.254.138.177:5555
and you get the device from:
adb devices
enjoy!
@enchev I would like to have this working. With Windows 10 it is a very useful feature, especially if you use docker heavily. Think it could be re-opened but low priority?
Most helpful comment
@enchev I would like to have this working. With Windows 10 it is a very useful feature, especially if you use docker heavily. Think it could be re-opened but low priority?