简体   繁体   中英

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

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?

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.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM