我正在使用 Android Emulator(版本 28.0.23-5264690)开发一个使用 QR 码的应用。模拟器上相机的虚拟场景功能可以选择将您自己的图像添加到场景中:
When using the emulator with a camera app, you can import an image in PNG or JPEG format to be used within a virtual scene. To choose an image for use in a virtual scene, click Add image in the Camera -> Virtual scene images tab in the Extended controls dialog.
This feature can be used to import custom images such as QR codes for use with any camera-based app.
但是,我尝试在模拟器设置中同时添加 JPG 和 PNG,但它们从未出现在股票相机应用程序或我自己的应用程序的虚拟场景中。我也试过重启模拟器,但还是不行。
知道可能出了什么问题吗?
最佳答案
我刚刚在 the Android emulator documentation for augmented reality 找到了这段文字:
To view these image locations in the scene, launch your emulator, then move the camera to the dining room area through the door behind the camera’s starting position.
显然,这些图像显示在与您开始时不同的房间。通过使用上面链接中描述的移动命令,您必须走进“餐厅”,这是通过后面的门狗。那里的图像显示在墙上和 table 上。
很遗憾,the QR code scanner Flutter library I'm using不响应二维码,所以我还是坚持使用物理设备。
关于android - 在模拟器相机应用程序中看不到虚拟场景图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54477634/