Check available space for iOS/android device in trigger.io app


#1

in our trigger.io app we’re using modules file and camera and some users having problems with app because they don’t have enough space available on their devices.

is there a way to check and notify a user that their device don’t have available space?


#2

Hi Igor,

I’ve just released v2.13 of the file module which adds a new API to retrieve device storage information.

You can use it like this:

forge.file.getStorageInformation(function (info) {
    forge.logging.log("Total space on device: " + info.total);
    forge.logging.log("Free space on device: " + info.free);
}, function (e) {
    // handle any errors
});

The success callback also includes information for app and cache directory sizes, for more information check out the module documentation.


#3

this works, thank you very much!