Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Regular Contributor J2meDeveloper's Avatar
    Join Date
    Jan 2009
    Posts
    103
    Is it possible to read(or locate) a RMS file written by a Midlet application? Also, how can I determine where the record store will be saved??

  2. #2
    Nokia Developer Champion im2amit's Avatar
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    2,916
    Yes, if you know name of the RMS created by one midlet, you can write another midlet to access it; if the AUTHMODE_PRIVATE is not set by the midlet that created it i.e. if AUTHMODE_ANY is set..... see the javax.microedition.rms.RecordStore API documentation for more details.

    Record stores are created in platform-dependent locations, which are not exposed to the MIDlets. The naming space for record stores is controlled at the MIDlet suite granularity. MIDlets within a MIDlet suite are allowed to create multiple record stores, as long as they are each given different names. When a MIDlet suite is removed from a platform all the record stores associated with its MIDlets will also be removed. MIDlets within a MIDlet suite can access each other's record stores directly. New APIs in MIDP 2.0 allow for the explicit sharing of record stores if the MIDlet creating the RecordStore chooses to give such permission.


    thanks,
    ~Amitabh

  3. #3
    Regular Contributor J2meDeveloper's Avatar
    Join Date
    Jan 2009
    Posts
    103
    Quote Originally Posted by im2amit View Post
    Yes, if you know name of the RMS created by one midlet, you can write another midlet to access it; if the AUTHMODE_PRIVATE is not set by the midlet that created it i.e. if AUTHMODE_ANY is set..... see the javax.microedition.rms.RecordStore API documentation for more details.

    Record stores are created in platform-dependent locations, which are not exposed to the MIDlets. The naming space for record stores is controlled at the MIDlet suite granularity. MIDlets within a MIDlet suite are allowed to create multiple record stores, as long as they are each given different names. When a MIDlet suite is removed from a platform all the record stores associated with its MIDlets will also be removed. MIDlets within a MIDlet suite can access each other's record stores directly. New APIs in MIDP 2.0 allow for the explicit sharing of record stores if the MIDlet creating the RecordStore chooses to give such permission.


    thanks,
    ~Amitabh
    please can u give any link related to that

  4. #4
    Nokia Developer Champion im2amit's Avatar
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    2,916
    read developers.sun.com/mobility/midp/articles/databaserms/

    thanks,
    ~Amitabh

  5. #5
    Regular Contributor J2meDeveloper's Avatar
    Join Date
    Jan 2009
    Posts
    103
    Quote Originally Posted by im2amit View Post
    read developers.sun.com/mobility/midp/articles/databaserms/

    thanks,
    ~Amitabh
    Thanks a lot that link will help me , one thing i want to know is can i atleast make a list of all the RMS that exists in the device (phone or memory )(not only the RMS cretaed by my application , RMS created by other applictaion can i know those RMS names ) ???
    if yes please guide me how to do that ???

  6. #6
    Nokia Developer Champion im2amit's Avatar
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    2,916
    You cannot get the list or names of the RMS files stored on the device, because its not present in the open filesystem as it is.
    Check Appdb folder of your emulator you will see somefile names they still have sometype of realtion with the RMS name given by j2me app... but on real device these are stored in System's private path and may not be accessable.


    thanks,
    ~Amitabh

  7. #7
    Regular Contributor J2meDeveloper's Avatar
    Join Date
    Jan 2009
    Posts
    103
    Quote Originally Posted by im2amit View Post
    You cannot get the list or names of the RMS files stored on the device, because its not present in the open filesystem as it is.
    Check Appdb folder of your emulator you will see somefile names they still have sometype of realtion with the RMS name given by j2me app... but on real device these are stored in System's private path and may not be accessable.


    thanks,
    ~Amitabh
    OK Can we cretate RMS in our desired path

  8. #8
    Nokia Developer Champion im2amit's Avatar
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    2,916
    From J2me we dont have control on the path where RMS is craeted as per default implementation of MIDP RMS..... workaround could be to create your own RMS implementation using (file's) FCA JSR-75 and then you can place the files in any desired path which is reachable by J2me.... you can even name all the your rms db files with extention of .rms

    thanks,
    ~Amitabh

  9. #9
    Regular Contributor J2meDeveloper's Avatar
    Join Date
    Jan 2009
    Posts
    103
    Quote Originally Posted by im2amit View Post
    From J2me we dont have control on the path where RMS is craeted as per default implementation of MIDP RMS..... workaround could be to create your own RMS implementation using (file's) FCA JSR-75 and then you can place the files in any desired path which is reachable by J2me.... you can even name all the your rms db files with extention of .rms

    thanks,
    ~Amitabh
    So .rms is a valid extension right?? so that we can create a new RMS in our desired path with the name along with the extension .rms and transfer the data of old rms we can do this right???

  10. #10
    Nokia Developer Champion im2amit's Avatar
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    2,916
    So .rms is a valid extension right?? so that we can create a new RMS in our desired path with the name along with the extension .rms and transfer the data of old rms we can do this right???
    This can be done, only if you develop your own implementation of rms using FCA API JSR-75 and do not use rms implementation of MIDP i.e. do not use - javax.microedition.rms.* package.Once you have your own implementation you can play around it as you wish... to add new features of auto-backup etc.


    thanks,
    ~Amitabh

  11. #11
    Regular Contributor J2meDeveloper's Avatar
    Join Date
    Jan 2009
    Posts
    103
    Quote Originally Posted by im2amit View Post
    This can be done, only if you develop your own implementation of rms using FCA API JSR-75 and do not use rms implementation of MIDP i.e. do not use - javax.microedition.rms.* package.Once you have your own implementation you can play around it as you wish... to add new features of auto-backup etc.


    thanks,
    ~Amitabh
    ohhh like that with out using rms packge we have to create our own file with .rms it acts like a normal text file right ???
    SO HOW SHALL I TRANSFER THE rms DATA INTO ANOTHER RMS SO THAT I CAN RETAIN ITS DATA AFTER UNINSTALLING MY APPLICATION ,HOW SHALL I DO THIS ????

  12. #12
    Nokia Developer Champion im2amit's Avatar
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    2,916
    Simple... give a data backup feature in your app; that reads your RMS record by record.... store it line by line in a flat text file on the open filesystem of the device.

    Also provide a data restore option in your app; that can read the lines of text from your backup files (from open filesystem) and store them in RMS as records.

    thanks,
    ~Amitabh

  13. #13
    Regular Contributor J2meDeveloper's Avatar
    Join Date
    Jan 2009
    Posts
    103
    Quote Originally Posted by im2amit View Post
    Simple... give a data backup feature in your app; that reads your RMS record by record.... store it line by line in a flat text file on the open filesystem of the device.

    Also provide a data restore option in your app; that can read the lines of text from your backup files (from open filesystem) and store them in RMS as records.

    thanks,
    ~Amitabh
    BUT TEXT FILE HAVE FILE SIZE LIMITATION RIGHT AND ALSO DATA WILL BE EXPOSED RIGHT CAN I STORE DATA IN TEXT FILE IN 0,1 OR SOME OTHER READABLE FORMAT

  14. #14
    Nokia Developer Champion im2amit's Avatar
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    2,916
    Yes you can store RMS records in filesystem after encrypting it and encoding it in base64 so that you can seperate each record by \n or the next line characher (if you cross the limit of max amount of data or lines in the text file) you can create 1 more backupfile and name it like backup001,backup002.... and so on (and takecare of all of them in restore process),
    or
    if you may try can export all data over network connection to your server side database and restore it from there.

    thanks,
    ~Amitabh

  15. #15
    Regular Contributor J2meDeveloper's Avatar
    Join Date
    Jan 2009
    Posts
    103
    Quote Originally Posted by im2amit View Post
    Yes you can store RMS records in filesystem after encrypting it and encoding it in base64 so that you can seperate each record by \n or the next line characher (if you cross the limit of max amount of data or lines in the text file) you can create 1 more backupfile and name it like backup001,backup002.... and so on (and takecare of all of them in restore process),
    or
    if you may try can export all data over network connection to your server side database and restore it from there.

    thanks,
    ~Amitabh
    thanks a lot for all the information i will try based on information that u have given me an again thanks a lot if i get a dout i will agin put a question here ok

    by the way how to encrypt the string and also retrive taht de-encrypt the data if u have any related code please provide me .


    but thanks a lot for all these information it helped me a lot many douts i had u haev cleared me most of it thanks alot.

Page 1 of 2 12 LastLast

Similar Threads

  1. On Device Debugging using USB
    By tinkywinky in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 7
    Last Post: 2010-03-11, 05:17
  2. RMS device limit
    By assorec in forum Mobile Java General
    Replies: 5
    Last Post: 2009-08-10, 05:46
  3. OMA Device Management Client Initialization problem
    By arieatuw in forum OMA DM/DS/CP
    Replies: 0
    Last Post: 2009-05-29, 04:54
  4. Bluetooth Security: What exactly is an untrusted device?
    By rahulmcs in forum Bluetooth Technology
    Replies: 1
    Last Post: 2005-12-02, 06:26
  5. Replies: 2
    Last Post: 2005-06-25, 06:03

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved