Save bitmap to app folder

前端 未结 5 1315
青春惊慌失措
青春惊慌失措 2020-12-15 02:03

When my app first starts, it lets the user select a profile picture. This can be done taking a photo at the moment, or selecting it from the gallery.

After the user

5条回答
  •  时光取名叫无心
    2020-12-15 02:46

    Well, you need to create the folder if it doesn't exist.

    try running this code and see if it fixes your issue:

    File parentDestination = saveFile.getParentFile();
        if (!parentDestination.exists()) {
            parentDestination.mkdirs(); //make all the directory structures needed
        }
    

提交回复
热议问题