×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Sep 2005
    Posts
    138

    Create a RMS before 1º execute

    Hello:

    I have an application that, in the 1st execute, read an xml archive, inside the .jar, and create a RMS database into the .jar archive of my application, with the information of the xml.

    In the 2nd, 3rd etc. executions, I look if the RMS database exists, and read the datas from it. (If doesn't exist, I read the xml, create the RMS...etc)

    Create the RMS database takes about 5 or 6 seconds, only in the 1st execution, but, I wish If I could, distribute my .jar application with the RMS database created.

    Can I run in the emulator my application, generate the RMS, and later distribute my .jar with the RMS generated? (or some similar)

    Thank you very much.

  2. #2
    Super Contributor
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,697

    Re: Create a RMS before 1º execute

    hi Pepper,
    RMS is managed by application manager and if I'm not wrong it:
    - cannot be redistributed in any other format than custom one (say you could simpy create xml file that contains data from RMS and send it to other device by any means)
    - it can be shared within the same device within midlets,
    - it can be shared if midlet is updated by newer version (ams will ask about that if rms already exists during update of midlet),
    You could for example store initial data on web server and update it from connected device and share between clients if required (so every client could update its initial settings simpy by writing data int local RMS),

    regards,
    Peter

  3. #3
    Regular Contributor
    Join Date
    Sep 2005
    Posts
    138

    Re: Create a RMS before 1º execute

    What I want to do is distribute my midlet with a RMS containing datas. I don't want generate the RMS the 1ºst time I start my application. Can I?

  4. #4
    Super Contributor
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,697

    Re: Create a RMS before 1º execute

    hi,
    but that's not possible, someone should correct or confirm me, That's part of MIDP/wireless mobile specification in regards to security matters,
    what you want to write? self-evolving application which spreads accross connected devices like virus (that would be possible if you could move things like RMS from device together with jad/jar suite) - no, I doubt,
    You could simple send application as usuallly from your phone and then if another user had that application installed simpy synchronize data between devices using any means: bluetooth, clients<>server configuration, etc, sending pims, sms, etc, everything which is within user controll and can be programmed with microedition,

    you have handy method in RMS implementation: if you open connectin to RMS without passing "true" it will fails (throw exception) because of rms not found,
    if that is run first time after midlet is installed that means you need to: provide basic configuration (e.g. from MIDLET .jad/.jar properties), save/create new basic configuration in RMS and if required let the user know that he/she could synchronize its settings with other phone (where midlet is installed) or via web server,
    look at widset:
    https://www.widsets.com/index
    that's how exactly synchronization of local client could be done with what i wrote,


    regards,
    Peter

  5. #5
    Regular Contributor
    Join Date
    Sep 2005
    Posts
    138

    Re: Create a RMS before 1º execute

    //If the database that contains my profile exist, I get a reference to it

    try{
    rsPerfil = RecordStore.openRecordStore(_miPerfil, false);

    }catch (Exception e)
    {
    try {
    //...if doesn't exist, I create it...
    rsPerfil = RecordStore.openRecordStore(_miPerfil, true);

    //...recover myProfile.xml (is a "clean" sample)
    byte[] perfilVacio = recuperarPlantilla("/res/miPerfil.xml");

    //I store it into the recordStore.
    numRegPerfil = rsPerfil.addRecord(perfilVacio, 0, perfilVacio.length);

    perfilVacio = null;
    } catch (Exception ex) {/*ex.printStackTrace();*/ System.out.println("linea 81");}
    }


    Doing this, I have always a personal profile in my system, the 1ºst time, is empty, clean, an example...

    after the first execution, it has the profile os the user (if the user has changed it)
    What I want is distribute my application with the profile inside the RMS jet, so the user don't need to wait a few seconds while the RMS is created.

Similar Threads

  1. RMS data LOST problem in 3410!!!
    By bitsonic in forum Mobile Java General
    Replies: 6
    Last Post: 2009-03-27, 09:50
  2. RMS not saved on Nokia 6225
    By franckspike in forum Mobile Java General
    Replies: 2
    Last Post: 2004-10-11, 07:42
  3. Replies: 9
    Last Post: 2004-09-12, 10:08
  4. 7210 & 7250 RMS resetting problem
    By keithmcneill in forum Mobile Java General
    Replies: 1
    Last Post: 2003-11-13, 21:04
  5. Resource Bundle or RMS
    By LiveRock in forum Mobile Java General
    Replies: 6
    Last Post: 2003-10-03, 03:07

Posting Permissions

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