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

后端 未结 11 1680
囚心锁ツ
囚心锁ツ 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:20

    I had the same problem too. I used this code:

    Intent photoPickerIntent = new Intent(Intent.ACTION_GET_CONTENT);
    photoPickerIntent.setType("image/*");
    startActivityForResult(photoPickerIntent, SELECT_PHOTO);
    

    Using the ADM, add the images on the sdcard or anywhere.

    And when you are in your vm and the selection screen shows up, browse using the top left dropdown seen in the image below.

提交回复
热议问题