J2ME: Transferring RMS Data from Emulator to Mobile Device

Discussion in 'Java' started by swy128, Nov 5, 2006.

  1. swy128

    swy128 Guest

    We are planning to use the RMS to store our mobile application's
    resource data (plain text), which are mainly used for populating the
    drop downs (a.k.a. Choice Group) in the GUI. We have a lot of files
    that need to be deployed with the mobile application. One of them has a
    size of about 300K! It is fast to just download the file(s) via http.
    However, it takes a very long time to process the downloaded data. By
    "process", I mean by first storing the downloaded data in an RMS record
    store and then place the data to different RMS record stores according
    to certain criteria. We do this "process" because the requirements
    state that we cannot show hundreds of data item in the drop downs at
    any given instance for the sake of usability.

    I would like to know if it is possible for us to use the J2ME emulator
    to first load the resource data into the emulator's RMS, and then
    deploy the emulator's RMS to the mobile device. If possible, how to do
    it?

    Thanks!

    Simon.
    swy128, Nov 5, 2006
    #1
    1. Advertising

  2. swy128

    swy128 Guest

    Hi... Please assist... I desparately need help on this issue. Thanks!

    Simon.

    swy128 wrote:
    > We are planning to use the RMS to store our mobile application's
    > resource data (plain text), which are mainly used for populating the
    > drop downs (a.k.a. Choice Group) in the GUI. We have a lot of files
    > that need to be deployed with the mobile application. One of them has a
    > size of about 300K! It is fast to just download the file(s) via http.
    > However, it takes a very long time to process the downloaded data. By
    > "process", I mean by first storing the downloaded data in an RMS record
    > store and then place the data to different RMS record stores according
    > to certain criteria. We do this "process" because the requirements
    > state that we cannot show hundreds of data item in the drop downs at
    > any given instance for the sake of usability.
    >
    > I would like to know if it is possible for us to use the J2ME emulator
    > to first load the resource data into the emulator's RMS, and then
    > deploy the emulator's RMS to the mobile device. If possible, how to do
    > it?
    >
    > Thanks!
    >
    > Simon.
    swy128, Nov 8, 2006
    #2
    1. Advertising

  3. swy128

    Simon Brooke Guest

    in message <>, swy128
    ('') wrote:

    > Hi... Please assist... I desparately need help on this issue. Thanks!


    OK, I am not an expert, but I think it can't be done.

    The reason that it can't be done is that the RMS standard does not mandate
    the format in which RMS data must be stored, and consequently it it likely
    to be held in different places and in different formats on different
    devices.

    I suggest you store your default data in a file on a server somewhere, and
    when your MIDlet starts up it should do something like:

    RecordStore qdb = null;

    try
    {
    qdb = RecordStore.openRecordStore(
    getAppProperty( STORENAME ), false );
    }
    catch ( RecordStoreNotFoundException rex)
    {
    /* store doesn't exist: create... */
    qdb = RecordStore.openRecordStore(
    getAppProperty( STORENAME ), true );

    /* ... and initialise it */
    BufferedReader buffy =
    new BufferedReader(
    new InputStreamReader(
    Connector.openInputStream( INITDATAURL)));

    for ( String rec = buffy.readLine(); rec != null;
    rec = buffy.readLine())
    {
    qdb.addRecord( rec.getBytes(), 0, rec.length());
    }
    }

    Note: that's off the top of my head, I haven't tried it.

    --
    (Simon Brooke) http://www.jasmine.org.uk/~simon/

    ;; in faecibus sapiens rheum propagabit
    Simon Brooke, Nov 8, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. robin
    Replies:
    0
    Views:
    863
    robin
    Jul 20, 2003
  2. Rohit

    j2me and RMS

    Rohit, Apr 2, 2004, in forum: Java
    Replies:
    1
    Views:
    968
    Darryl L. Pierce
    Apr 2, 2004
  3. nishadixit
    Replies:
    5
    Views:
    1,252
    Joe Discar
    Jun 1, 2005
  4. Replies:
    3
    Views:
    654
    jan V
    Sep 14, 2005
  5. chen selina
    Replies:
    0
    Views:
    1,292
    chen selina
    Jul 13, 2010
Loading...

Share This Page