How to Add an Image to Android Emulator Directly or through Visual Studio (Xamarin Project)

一曲冷凌霜 提交于 2020-01-05 04:27:07

问题


I currently am creating an Android application using Visual Studio 2015. It requires to have an image in the AVD to test the application.

How do we add image to our emulated Android device in Visual Studio (Xamarin Project)?

I have seen some questions and answers to do so in Eclipse or Android Studio (Java-based):

  1. How to add an image to the emulator gallery in android studio?
  2. How we save image in gallery of emulator
  3. upload picture to emulator gallery

But I cannot find one to do it in Visual Studio.

If I try to use camera in my emulator, it shows camera error, cannot connect to camera.

So, naturally I am trying to find a way to just put an image directly to the emulated Android device's folder either through VS or directly.

Any idea?


回答1:


So, naturally I am trying to find a way to just put an image directly to the emulated Android device's folder either through VS or directly.

You can use DDMS.

  1. Run your emulator with VS 2015.

  2. Open DDMS:

  1. Use File Explorer to find storage -> emulated -> 0 ->Pictures folder.

  2. Pull your picture from your PC to this folder.

  3. Restart your AVD, then you can find the file from Photo or Gallery app.



来源:https://stackoverflow.com/questions/43538453/how-to-add-an-image-to-android-emulator-directly-or-through-visual-studio-xamar

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