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

后端 未结 11 1653
囚心锁ツ
囚心锁ツ 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 06:16

    I'd like to complement Mithilesh Izardar's answer:

    Indeed the best approach is simply to "Drag and Drop", which afterwards you can find the files in the emulator at Settings → Storage → Internal Storage → Explore → Download (API 25). The problem for me was that after following these steps the pics weren't appearing neither in the "Gallery" nor in the "Downloads" (by simply clicking the "Downloads" icon).

    The reason for this is because by default everything in the emulator has no permissions...so all you gotta do is give the "Gallery" storage permission: Settings → Apps → Gallery → Permissions (API 25)

    Ps: If you just copied the pictures, the new ones won't show up right away. You should either restart the emulator, or remount the sdcard (at Settings → Storage unmount the sdcard by clicking the eject icon then remount it)

提交回复
热议问题