Reputation: 77
Is there a way to know what is the available Storage space? I can't find anything in Storage class. I'd like to advise the user that a download couldn't be done if there is not enough space.
Maybe I can catch an exception (is it the, too much generic, IOException?) if there is no space left when downloading the file? Is there a way to be sure that this a storage space problem?
Upvotes: 1
Views: 34
Reputation: 52770
This isn't available in Storage
but it is available in FileSystemStorage.getRootAvailableSpace which isn't quite the same but for most devices should give you the same answer.
Upvotes: 1