Why Images.Media.insertImage return null

前端 未结 7 509
耶瑟儿~
耶瑟儿~ 2020-12-03 20:55

I have some code where I run the method MediaStore.Images.Media.insertImage (inserting it from a source not a file name), This code saves the image to the MediaStore and ret

相关标签:
7条回答
  • 2020-12-03 21:45

    When i had such a problem i fixed it with adding permissions:

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    
    0 讨论(0)
提交回复
热议问题