How to add an image to the emulator gallery in android studio?

后端 未结 11 1651
囚心锁ツ
囚心锁ツ 2020-12-13 05:38

I am developing an image filter app. But can\'t really try it if i don\'t have any images.

I know that i can test it in the phone, but it\'s not the same, since I n

相关标签:
11条回答
  • 2020-12-13 05:53

    I went through the Android Device Monitor

    1. Click on device
    2. Select Android Device Monitor's File Explorer tab
    3. Select Pictures folder (path: data -> media -> 0 -> Pictures)
    4. Click "Push folders on to device" icon
    5. Select pic from computer and ok.
    0 讨论(0)
  • 2020-12-13 05:53

    As of API 28 at least:

    1. Open Settings app in emulator
    2. Search for "Storage" select search result for it
    3. Select Photos & Videos in Storage
    4. Select Images
    5. Drag an image onto the emulator, it won't immediately show up
    6. From the AVD Manager in Android Studio, cold boot the emulator

    The photos you've dragged in are now available.

    0 讨论(0)
  • 2020-12-13 05:57

    Workaround simple and quick. Upload file/photo on cloud (from outside the emulator) and download with browser on the emulator.

    0 讨论(0)
  • 2020-12-13 06:10

    Try using Device File Explorer:

    1. Start the Device

    2. Navigate to View->Tool Windows->Device File Explorer to open the Device File Explorer

    3. Click on sdcard and select the folder in which you want to save the file to.

    4. Right-click on the folder and select upload to select the file from your computer.

    5. Select the file and click ok to upload

    0 讨论(0)
  • 2020-12-13 06:12

    It's a very old question but I will answer this for future references.

    To add any file to emulator just drag and drop the file.

    The file will be copied to downloads folder of internal storage.

    To access the file

    Go to settings

    Click On Storage & USB

    Click On Internal Storage

    Click On Explore (at the end)

    and you got it in the downloads folder

    now you will get notification to setup virtual SD card, follow the setup. after the successful setup you will be able to see pictures in gallery.

    0 讨论(0)
  • 2020-12-13 06:12

    How to import images into the gallery of an Android Virtual Device using Android Studio: I'm using Android Studio 1.4.1 and a API 15 virtual device.

    Warning: This is manual intensive so it is not a good solution for a large number of images.

    1. Create a virtual device using Android's Device Manager (AVD), Menu /Tools/Android/AVD Manager.
    2. Start this virtual device.
    3. Start the Android Device monitor, Menu */Tools/Android/Android Device Monitor. In the Devices tab (upper left) you should see your device. It should be Online (see this screenshot)
    4. On the right window is the File Explorer. Go there and select the /mnt/sdcard/Pictures directory. It should be highlighted (see this screenshot)
    5. Add jpegs to this directory by clicking on the Push a file onto the device icon (the little phone icon I highlighted in the above screenshot. You can add only one photo at a time, dadburnit.
    6. Go to your device and run the Dev Tools app.
    7. Scroll down and select Media Provider.
    8. Click on the Scan SD Card button. This should copy the images you added in step 5 to the gallery. Go to the gallery and look, they should be there.
    0 讨论(0)
提交回复
热议问题