-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
Add position parameter to mobileInjectEmulatorCameraImage #940
Comments
It is possible to add such argument, however I don't think it is going to work seamlessly. You'd need to restart the whole emulator in order for it to be picked up. The reason for that is that Google provides no way to change virtual scene params over the telnet interface except of for images themselves (I mean the Other settings need to be loaded from the config file directly, which requires the media service to be restarted. And since it is not possible to do that without having the root access, the only way would be to restart the emulator completely. |
If I understand correctly, this config gets passed to the virtualscene-image command. Perhaps I'm missing something, but wouldn't changing |
I think I get it. You'd need to restart the emulator for |
Right. The whole emulator must be restarted in order for virtual scene to pick up the changes |
Also, when I used |
yes, it could be the case. https://github.com/appium/appium-uiautomator2-driver?tab=readme-ov-file#mobile-injectemulatorcameraimage mentions that camera service needs to be restarted after the config is changed for the very first time, although it is probably not very obvious. I'll update it to be clear about emulator restart. |
@hadalin Maybe try appium/appium-uiautomator2-driver#798 after it is merged. It still needs to restart the emulator, but it's probably ok, since the action is anyway automated |
What could be done, though, is to split the functionality into two methods. The first one would be something like |
I assume it would be painful to do emulator restart mid-session. the reason for it is that the uia2 server must be running there. By restarting the emulator we have to kill it and then restore the session seamlessly. Currently it is not possible without major architecture changes in the server package. |
The
mobileInjectEmulatorCameraImage
is very useful, thank you.Would it be possible to add
position
parameter, along with thepayload
that would allow setting the position of the injected image?The text was updated successfully, but these errors were encountered: