×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Aug 2003
    Posts
    5

    Saving downloaded data

    Hi,

    Anyone knows if it's possible/how to store data which has been downloaded through http connection as a file on the mobile device? is it a simple file fopen/fclose?

    Last question, this time it's the opposite way, if there's a possibility to browse/list mobile files in order to upload to a websever.

    I'm trying to write an application which would allow uploading and downloading document files through a mobile device.

    Thanks alot!

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    Look into the RMS package. It's the only option for persistant storage. You can save downloaded data on the phone in RMS, but you won't be able to read anything, unless it is something that was written by the same MIDlet suite. There is no filesystem in MIDP.

  3. #3
    Registered User
    Join Date
    Aug 2003
    Posts
    5
    Hi,

    Thanks for the reply, but isn't that for data management storage? For example, I wish to download an image file through the midlet and be able to save it locally on the device.

    While on the other hand, I wish to "browse" the mobile file content and be able to "read" a file in order to upload it to a websever..

    I'm not sure RMS would work for this...

  4. #4
    Registered User
    Join Date
    Jul 2003
    Location
    Finland, Tampere
    Posts
    1,113
    MIDlet is run in a sand-box. It's very restricted thing. From the MIDlet's point of view, there is no phone at all, just his tiny sand-box where it can store some bytes and a window to the internet (HTTP) where it can get something

  5. #5
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    If you download the image, you can save it in the RMS as an array of bytes if you wish. RMS size is usually very limited (< 20K) so take that into account.
    You won't be able to "browse" your phones' filesystem though, because of the sandbox model.

  6. #6
    Registered User
    Join Date
    Aug 2003
    Posts
    5
    Thanks alot doctordwarf and shmoove for the information! it's too bad midlets are so limited on mobile devices, I guess the only way to download an image using a midlet is to actually make the midlet connect to the server in order to invoke an sms with link to the file

    PS shmoove: I was born Haifa, Israel.. now I live in Oslo, Norway.. I hope things get better down there for everyone's sake


    Thanks again!

  7. #7
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    PS shmoove: I was born Haifa, Israel.. now I live in Oslo, Norway..
    I lived in Haifa for ten years. Now I live in Tel Aviv. (Guess I didn't get as far ).
    Just to get you started on downloading images:
    http://nkn.forum.nokia.com/forum/sho...%2Agetimage%2A
    You could easily change this into storing the image data in RMS.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×