Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can I backup record stores for my midlet on phones?

 
Sam lx
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I wonder how can I backup the record stores of my midlet,
how can I take a backup of files of the record stores,
I mean on the mobile phone. For example Motorola's mobile phones.

Many thanks!
 
Jason Fox
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One solution I've used is to add a way for your midlet suite to read out the contents of the RMS to a listening connection. I used a CommConnection to write the data to a device listening on the serial port, but using an HttpConnection to record the data on a server would work just as well. Unfortanately, this will only back up the indiviual midlet suite's RMS records. I hope this helps.
 
Sam lx
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot my friend,

I noticed that for MIDP2.0, you can access another midp suite's
record store, is it possible, and how can I do this?

Best regards!
 
Tomas Conway
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is possible to access a record store in another MIDP suite, but only if permission to share the record store was specified at the time of the record store's creation.

To create a RecordStore with permission to allow access from other MIDlet suites, use the four parameter version of 'openRecordStore' and specify 'Record.AUTHMODE_ANY' for the third parameter.

E.g.




To access such a record store from another MIDlet use the three parameter version of 'openRecordStore', and use the 'MIDlet-Vendor' and 'MIDlet-Name' attributes from the MIDlet's JAD [the JAD of the MIDlet whose record stores you are trying to access] as the second and third parameters.

E.g.

 
Sam lx
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks very much, there are so many experts here,
Great.
I will have a try!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic