Local database in j2me midp 1.0

杀马特。学长 韩版系。学妹 提交于 2019-12-13 00:36:12

问题


I am developing one application in J2me MIDP 1.0

It requires local database management. I have heard about recordStore but can we use it for permanent storage?


回答1:


Yes, your application can store data using a RecordStore, and you can get it back later even if the application or the phone has been shut down.

EDIT:

One example I found: http://www.roseindia.net/j2me/read-write-midlet.shtml




回答2:


RecordStore, or more generally, MIDP RMS API is intended just for use for permanent storage:

...The MIDP provides a mechanism for MIDlets to persistently store data and retrieve it later. This persistent storage mechanism, called the Record Management System (RMS), is modeled after a simple record-oriented database...

If you're interested in more details, refer to javax.microedition.rms package API documentation. Since you mention MIDP 1.0, make sure that you don't use API annotated as since: 2.0 in these javadocs.

Also, online tutorials are available to get you started, like:

  • MIDP Database Programming Using RMS: a Persistent Storage for MIDlets
  • Databases and MIDP, Part 1: Understanding the Record Management System


来源:https://stackoverflow.com/questions/9718732/local-database-in-j2me-midp-1-0

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!