-
-
Notifications
You must be signed in to change notification settings - Fork 197
Expose emulator api #3733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose emulator api #3733
Conversation
lib/definitions/debug.d.ts
Outdated
@@ -86,6 +86,9 @@ interface IDebugOptions { | |||
* Defines if should print all availableDevices | |||
*/ | |||
availableDevices?: boolean; | |||
|
|||
sdk?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing XML comments
@@ -121,6 +121,11 @@ function createTestInjector(projectPath: string, projectName: string, xcode?: IX | |||
testInjector.register("httpClient", {}); | |||
testInjector.register("platformEnvironmentRequirements", {}); | |||
testInjector.register("plistParser", {}); | |||
testInjector.register("androidEmulatorServices", {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we register Android specific services in iOS project service?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this tests relies on real DevicesService
-
testInjector.register("devicesService", DevicesService); |
On the other hand
devicesService
injects androidEmulatorServices
so we need it here.
run ci |
1 similar comment
run ci |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new API does not have documentation. Please follow the guidelines described here
09679bc
to
ad2fbc3
Compare
run ci |
1 similar comment
run ci |
0cc77c2
to
89173dd
Compare
run ci |
89173dd
to
0a02a0f
Compare
run ci |
0ff064d
to
b1b49cf
Compare
b1b49cf
to
da6955b
Compare
PublicAPI.md
Outdated
@@ -1198,6 +1201,45 @@ tns.sysInfo.getSystemWarnings() | |||
.catch(err => console.error(`Error while trying to get system warnings: ${err}`)); | |||
``` | |||
|
|||
## devicesService | |||
The `devicesService` module allows interaction with devices and emualtors. You can get a list of the available emualators or start a specific emulator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
emualtors
-> emulators
da6955b
to
1875c88
Compare
1875c88
to
27b4c22
Compare
Related to this PR: telerik/mobile-cli-lib#1101
PR Checklist
This PR deletes all legacy, unneeded and duplicated code that is used for working with iOS and Android emulators.
This PR adds the functionalities below:
tns devices android --available-devices
- shows all available Android genymotion and Android avd emulators (previously only avd emulators were shown)tns devices --available-devices
- works correctly and shows all available iOS simulators, Android genymotion and Android avd emulators. (previously does not work)tns run android --device <imageIdentifier>
- it is already possible to run on device with specified imageIdentifier (previously it can run only on emulators specified by identifier or name)This PR exposes emulator api from devicesService. The api consists from the following two methods:
Each available android emulator (NOTE: not running emulator) has the properties below:
Each running android emulator has the properties below:
--timeout
option. This option describes the timeout in miliseconds that {N} CLI will wait emulator boot to complete. It might take too long time on some machines to start native android emulator, so this option is useful in such cases.