Android emulator camera custom image

风格不统一 提交于 2020-07-05 05:26:15

问题


Does anybody know is it possible to open some personal picture when emulator camera starts?

I have an application which is based on image analysis and I would like when I click a button for camera that camera opens not that default Android emulator moving image. I want it to open some image which I set as a default image. So when I choose to take a picture it will show only that image and when I take a take a picture, that image will be saved to gallery, not Android default image.


回答1:


Download the source from following url . This is work as the another Gallery in the emulator. While passing intent to capture image from camera choose this gallery. this is looks like samsung mobile 3d gallery.. this will return the default images.. in emulators . one more thing it will work fine after 3.0 versions only.

https://github.com/c-jiang/Gallery3D-Mod




回答2:


Under Tools > AVD Manager, select the "pencil" to get to "Virtual Device Configuration". Show Advanced Settings > Camera will give you the option of using emulated, or a device:

Device - use host computer webcam or built-in camera

If all you need is to get a still image into the camera, starting with Android Studio 3.2 you can put your static images into the virtual scene:

as discussed in this entry from Android developers blog. Note that you'll need to move the camera position into the dining room to see your images (turn around and use Alt-w to move forward).




回答3:


It seems the only solution is to use a remote camera.

This is one way to do it: http://www.tomgibara.com/android/camera-source

It's not something what I was looking for but I think it can be used for testing. Maybe even barcode scanner would work with this if the barcode is placed properly in front of camera.



来源:https://stackoverflow.com/questions/13818389/android-emulator-camera-custom-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!