Mobile disk size

Mobile disk size

  

Any way to return the disk size available and consumed from the device?

Hi Filipe,

On a mobile device that's not as straightforward as for a desktop computer. A mobile device may have many partitions, and a mobile app may be moved (at least on Android) between the SD card and the on-board flash memory. I think on iOS, an App can't even access the local file system in a generic way at all, afaik, so knowing the free space doesn't help you there.

Solution

Filipe Lourenço wrote:

Any way to return the disk size available and consumed from the device?

Dear Filipe,


One cordova plugin is available to check the disk size. you can wrap it in outsystems and get the result.

cordova plugin add org.apache.cordova.file

Please go through with the link:

https://www.thepolyglotdeveloper.com/2015/02/get-available-free-disk-space-using-apache-cordova/


Regards,



Solution

mohammad hasib wrote:

Filipe Lourenço wrote:

Any way to return the disk size available and consumed from the device?

Dear Filipe,


One cordova plugin is available to check the disk size. you can wrap it in outsystems and get the result.

cordova plugin add org.apache.cordova.file

Please go through with the link:

https://www.thepolyglotdeveloper.com/2015/02/get-available-free-disk-space-using-apache-cordova/


Regards,




Yes it does but do you know how to return a particular folder size? Thank you

Filipe Lourenço wrote:

mohammad hasib wrote:

Filipe Lourenço wrote:

Any way to return the disk size available and consumed from the device?

Dear Filipe,


One cordova plugin is available to check the disk size. you can wrap it in outsystems and get the result.

cordova plugin add org.apache.cordova.file

Please go through with the link:

https://www.thepolyglotdeveloper.com/2015/02/get-available-free-disk-space-using-apache-cordova/


Regards,




Yes it does but do you know how to return a particular folder size? Thank you


I did not tried it but as per the plugin the value of result is available free disk space and you can take one output parameter in javascript and assign the result value in it. 

cordova.exec(function(result) {    

alert("Free Disk Space: " + result);

}, 

function(error) {    

alert("Error: " + error)

;}, 

"File", "getFreeDiskSpace", []);

Regards,

Yes but it does not return the size of a folder

Filipe Lourenço wrote:

Yes but it does not return the size of a folder

In which os you are trying in IOS or android?

I will try it from my side and will let you know.

Regards,

Both. Thanks

Filipe Lourenço wrote:

Both. Thanks

Dear Filipe,

Is it showing you the value in alert? 

Regards,