Checking amount of "disk space" left on device

I have an app that allows people to record their own audio which I’m saving to the documents directory.

Is there a way of checking how much “disk space” is remaining on the device so I can warn the user to delete some other audio or free up some space via iTunes prior to making a new recording with my app.

Also, does anyone know what will happen if maximum capacity is reached whilst a recording is being made using my app? Does Corona include any event listeners which fire back any errors for a situation like this?

Any advice would be much appreciated.

Thanks,

Ian [import]uid: 123492 topic_id: 34112 reply_id: 334112[/import]

Hello,
I don’t believe this is possible in Corona (that information is not exposed from the OS). If they try to save and there’s not enough room, I expect the process would silently fail… or at worst case (unlikely) the app itself would error.

Best regards,
Brent [import]uid: 200026 topic_id: 34112 reply_id: 135641[/import]

Hello,
I don’t believe this is possible in Corona (that information is not exposed from the OS). If they try to save and there’s not enough room, I expect the process would silently fail… or at worst case (unlikely) the app itself would error.

Best regards,
Brent [import]uid: 200026 topic_id: 34112 reply_id: 135641[/import]

Hi all,

Just wondering if anyone had any more info on this. It’s over a year since I originally enquired so I was wondering if anything had changed.

My app allows the download of audio files from a remote server. If there isn’t enough disk space on their device to save the audio then I’m keen to let the user know with a friendly error rather than a silent fail or crash obviously.

Anyone have any ideas?

Many thanks in advance.

Ian

Hi all,

Just wondering if anyone had any more info on this. It’s over a year since I originally enquired so I was wondering if anything had changed.

My app allows the download of audio files from a remote server. If there isn’t enough disk space on their device to save the audio then I’m keen to let the user know with a friendly error rather than a silent fail or crash obviously.

Anyone have any ideas?

Many thanks in advance.

Ian

A few months on from my last post on this topic but it’s still something that interests me, so if anyone at Corona has any idea as to whether this is likely to be possible…?

My app allows audio to be downloaded from a remote server and obviously if the audio file is large and the user doesn’t have enough space on their device, there currently doesn’t seem to be any elegant way to handle this.

Has anyone else found a way to handle this problem?

Thanks,

Ian

I’m looking for the same thing.

Here’s how to do it on iOS:

http://stackoverflow.com/questions/9270027/iphone-free-space-left-on-device-reported-incorrectly-200-mb-difference

Here’s how on Android:

http://stackoverflow.com/questions/3394765/how-to-check-available-space-on-android-device-on-mini-sd-card

Thanks for responding.

Okay - so it can be achieved, but just not in Corona? If anyone from Corona can shed some light on this that would be brilliant…

Thanks,

Ian

Well I will write a plugin for that, but I’m not sure it will qualify for something Corona would want to release on their repository.

So if you are not using enterprise, then you are screwed, sorry.

No - not on Enterprise unfortunately. Thanks for the response though.

A few months on from my last post on this topic but it’s still something that interests me, so if anyone at Corona has any idea as to whether this is likely to be possible…?

My app allows audio to be downloaded from a remote server and obviously if the audio file is large and the user doesn’t have enough space on their device, there currently doesn’t seem to be any elegant way to handle this.

Has anyone else found a way to handle this problem?

Thanks,

Ian

I’m looking for the same thing.

Here’s how to do it on iOS:

http://stackoverflow.com/questions/9270027/iphone-free-space-left-on-device-reported-incorrectly-200-mb-difference

Here’s how on Android:

http://stackoverflow.com/questions/3394765/how-to-check-available-space-on-android-device-on-mini-sd-card

Thanks for responding.

Okay - so it can be achieved, but just not in Corona? If anyone from Corona can shed some light on this that would be brilliant…

Thanks,

Ian

Well I will write a plugin for that, but I’m not sure it will qualify for something Corona would want to release on their repository.

So if you are not using enterprise, then you are screwed, sorry.

No - not on Enterprise unfortunately. Thanks for the response though.

Any news on this? As keystagefun said, I would like to inform the user beforehand.

We are getting close to having the marketplace ready.   We did a soft launch last week (no big fan fair).  Just go to the regular plugins page and see what’s there.  There is a form that you can fill out to suggest plugins you would like to do.  We will review them and get up with you for the process of actually submitting the plugins.  Initially we are only going to support free plugins as we continue to work out the accounting side.

So any Enterprise developer can fill out this form to get things started.

Rob

I take that as it’s not yet possible to check if downloads to the app sandbox will fill up the phone. Right?

Correct.  It is not possible using Corona SDK to detect this.

Rob

Any news on this? As keystagefun said, I would like to inform the user beforehand.