Topic
  • 3 replies
  • Latest Post - ‏2013-02-01T11:16:01Z by IdanAdar
MuraliK,Meduri
MuraliK,Meduri
50 Posts

Pinned topic How to know available space in the device

‏2013-01-31T15:32:27Z |
Hi Team
Iam working with the files, Does Worklight / Cordova provides any feature to know the available space on the device (or SD card). Before i download the file i have to warn the user, whats the size of the PDF, and how free space he has in his device. Can you please help me out on this?
  • IdanAdar
    IdanAdar
    741 Posts

    Re: How to know available space in the device

    ‏2013-01-31T18:32:50Z  
    Searching on StackOverflow, I found two approaches:

    http://stackoverflow.com/questions/6877673/how-do-i-get-the-amount-of-free-disk-space-in-phonegap
    http://stackoverflow.com/questions/3394765/how-to-check-available-space-on-android-device-on-mini-sd-card

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
  • MuraliK,Meduri
    MuraliK,Meduri
    50 Posts

    Re: How to know available space in the device

    ‏2013-02-01T08:37:58Z  
    • IdanAdar
    • ‏2013-01-31T18:32:50Z
    Searching on StackOverflow, I found two approaches:

    http://stackoverflow.com/questions/6877673/how-do-i-get-the-amount-of-free-disk-space-in-phonegap
    http://stackoverflow.com/questions/3394765/how-to-check-available-space-on-android-device-on-mini-sd-card

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    Hi Idan, thanks for the reply, one post is written in native language of Android, the other one is not useful, its a incomplete post
    we are looking in either Worklight or phonegap, have you ever come across?
  • IdanAdar
    IdanAdar
    741 Posts

    Re: How to know available space in the device

    ‏2013-02-01T11:16:01Z  
    Worklight does not provide such API, and I don't see a Cordova API for this either, however...
    The code being in Java is not a problem, because you can utilize it via a Cordova plug-in.

    Please see this training module, Android Development Using the Apache Cordova Plugin:
    ftp://public.dhe.ibm.com/software/mobile-solutions/worklight/docs/v505/Module_09_3_-_Android_Development_Using_the_Apache_Cordova_Plugin.pdf

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform