×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    37

    RMS available size?

    As the 3510i has very little space for embedding resources, one solution consists of downloading some and storing them in the RMS. Unfortunatly, the RMS is also limited and I think it is probably shared by all downloaded apps.
    Is there a way to programmatically know the RMS size, and the available size?

  2. #2
    Registered User
    Join Date
    Jul 2003
    Location
    Finland, Tampere
    Posts
    1,113
    esteinitz
    Use RecordStore.getSizeAvailable()

    Note that value it returns can be a bit different from the exact amount of bytes you can store. However, it gives good estimation.

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    37
    cheers.
    Ok so it looks like we can dispose of 20400 bytes per midlet, which is neough for me. BUT my point is that when i download files, let say 4 files one after the other, the prog fails with an "impossible to launch program" error (though its already running) at the 4th file. When I dl only 3 files, there is no error, but the code is exactly the same. Of course it works well with the emulator (if you except emulator's own problems with the connection API, anyway).
    The size of all the dled resources is about 15,5Ko, so any idea?

  4. #4
    Registered User
    Join Date
    Jul 2003
    Location
    Finland, Tampere
    Posts
    1,113
    Sorry, your problem is not clear for me.

    Maybe the 4th file is too big, and doesn't fit in the remaining space.
    check available space before loading it

  5. #5
    Registered User
    Join Date
    Mar 2003
    Posts
    37
    my problem is that with the same code, my midlet fails to download one more file, though the total amount bytes is about 15,5ko, ie less than those 20400.
    I wonder why I get this error, which i would say is a memory error, but that sends no exception. So I wonder if ther's a pb with the telephone itself, or with the SDK, or with some humility with my code (which i don't think)

  6. #6
    Registered User
    Join Date
    Jul 2003
    Location
    Finland, Tampere
    Posts
    1,113
    Check the available size after loading each resourse. It might happen that your resources actually take more space on the phone.

Posting Permissions

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