Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Intall resources on sdcard

Hi,

I'm developing an application for android and later Iphone that will be displaying content (video, audio, text and images).

There is more than likely going to be allot of content.
Initially the content will need to be installed and loaded from the sdcard as there will not be enough room on the target device's built in memory plus the application size will be ridiculous. (this application initially won't be available to the publc, so I could simply copy the folder over myself but would prefer it to be copied on install)

How do I get the application to install the contents to a folder on the sdcard?

I have seen some posts about reading from the sdcard and presume it would be similar.

— asked November 7th 2010 by Kevin
  • install
  • resources
  • sdcard
0 Comments

3 Answers

  • Accepted Answer

    Kevin

    Sometimes it's not easy to know what to search for. Try externalStorageDirectory

    There is also an example of its use in filesystem.js
    Hope this gets you to the answer

    Cheers

    Hal

    — answered November 7th 2010 by Paul Dowsett
    permalink
    2 Comments
    • Thanks for the reply and suggestion Hal.

      I'll have a look at that.
      I'm finding it a bit tricky at the moment especially with my lack of proficiency in programming.

      I can read it and understand, I can do the monkey see monkey do, but I can get sidetracked and overwhelemed by the list of functionalities I must figure out.

      I have to remind myself one step at a time, line by line, function by function.

      — commented November 7th 2010 by Kevin
    • Yes, don't be disheartened - it happens to all of us. :)
      The key is "little by little" and, over time, that will build into solid experience.

      Would you mind closing the question if you feel the answer is adequate? Thanks

      Hal

      — commented November 7th 2010 by Paul Dowsett
  • hey kevin ,

    i am with you on this ,that is one nice question …

    Hal's links were cool to give basic knowledge but they weren't the answers…

    coming to your question… i kinda think installing things to your sdcard during installation aint possible(as far as i know-@community pls correct me if i am wrong)…but there is always a way,

    may be you can just let the resources be on the resources directory during installation…

    but when the user fires up the app the first time (only the first time after a fresh install) write a small helper method that would do the work of copying all your resource files from resource dir(phone mem) to the sdcard during the root window open event…

    hope this works … [stay connected if you cant figure it out as i will be working on this in a couple of days as my project depends on this as how yours does…]

    — answered November 8th 2010 by Satta Ravi
    permalink
    0 Comments
  • Sattanaathan Ravi Thanks for the reply.

    Initially I will be able to physically put a folder on the sdcard and have the app read content from there. As this application will initially only be available on devices within a facility. At a later stage if it goes to market I will look at having the resources online and streamed.

    Having the resources folder bundled with tha app is not an option for me as the content could get up to a gig or possibly more.

    @Hal thanks for the support.

    — answered November 8th 2010 by Kevin
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.