Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Inserting data in rms

 
Ranch Hand
Posts: 99
Android Tomcat Server Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on j2me application that can used for serving quiz to user.Application takes stream containing questions from server and presents questions
in an appropriate format to user.It has the facility to save questions to rms recordstore so that user can browse questions offline.
Now I want to add functionality so that user can add questions to recordstore in offline mode by using a jar file or any other resource that contains questions . I tried using another midlet which contains questions and code for inserting questions in recordstore. But this method has limitations.
As I have to install another application or midlet for inserting questions in recorstore & second since recordstore are shared only in midp 2.0 & not in midp 1.0, but I also want to include midp 1.0 for my applicaion.I dont want to use fileconnection api
I am thinking of saving questions in a xml file & making that file part of application and than inserting questions into rms.But after inserting questions in rms i want to delete the file.I want to know can i delete a file that is part of application and how.

I need suggestions how to insert questions in offline mode to recordstore without installing another application or sharing recordstore.
 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try in same midlet, because these will not create sharing issue & will work on both MIDP1.0 & MIDP 2.0
In order to insert data to mobile rms you have to generate "insert" & "delete" methods using "javax.microedition.rms.RecordStore"

Conclusion:- By using "Saving in offline mode" feature in same Midlet, you didn't have to install another application or share recordstore.
 
Anuj Prashar
Ranch Hand
Posts: 99
Android Tomcat Server Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for replying ....
    Bookmark Topic Watch Topic
  • New Topic