Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > J2ME: Transferring RMS Data from Emulator to Mobile Device

Reply
Thread Tools

J2ME: Transferring RMS Data from Emulator to Mobile Device

 
 
swy128
Guest
Posts: n/a
 
      11-05-2006
We are planning to use the RMS to store our mobile application's
resource data (plain text), which are mainly used for populating the
drop downs (a.k.a. Choice Group) in the GUI. We have a lot of files
that need to be deployed with the mobile application. One of them has a
size of about 300K! It is fast to just download the file(s) via http.
However, it takes a very long time to process the downloaded data. By
"process", I mean by first storing the downloaded data in an RMS record
store and then place the data to different RMS record stores according
to certain criteria. We do this "process" because the requirements
state that we cannot show hundreds of data item in the drop downs at
any given instance for the sake of usability.

I would like to know if it is possible for us to use the J2ME emulator
to first load the resource data into the emulator's RMS, and then
deploy the emulator's RMS to the mobile device. If possible, how to do
it?

Thanks!

Simon.

 
Reply With Quote
 
 
 
 
swy128
Guest
Posts: n/a
 
      11-08-2006
Hi... Please assist... I desparately need help on this issue. Thanks!

Simon.

swy128 wrote:
> We are planning to use the RMS to store our mobile application's
> resource data (plain text), which are mainly used for populating the
> drop downs (a.k.a. Choice Group) in the GUI. We have a lot of files
> that need to be deployed with the mobile application. One of them has a
> size of about 300K! It is fast to just download the file(s) via http.
> However, it takes a very long time to process the downloaded data. By
> "process", I mean by first storing the downloaded data in an RMS record
> store and then place the data to different RMS record stores according
> to certain criteria. We do this "process" because the requirements
> state that we cannot show hundreds of data item in the drop downs at
> any given instance for the sake of usability.
>
> I would like to know if it is possible for us to use the J2ME emulator
> to first load the resource data into the emulator's RMS, and then
> deploy the emulator's RMS to the mobile device. If possible, how to do
> it?
>
> Thanks!
>
> Simon.


 
Reply With Quote
 
 
 
 
Simon Brooke
Guest
Posts: n/a
 
      11-08-2006
in message <(E-Mail Removed) om>, swy128
('(E-Mail Removed)') wrote:

> Hi... Please assist... I desparately need help on this issue. Thanks!


OK, I am not an expert, but I think it can't be done.

The reason that it can't be done is that the RMS standard does not mandate
the format in which RMS data must be stored, and consequently it it likely
to be held in different places and in different formats on different
devices.

I suggest you store your default data in a file on a server somewhere, and
when your MIDlet starts up it should do something like:

RecordStore qdb = null;

try
{
qdb = RecordStore.openRecordStore(
getAppProperty( STORENAME ), false );
}
catch ( RecordStoreNotFoundException rex)
{
/* store doesn't exist: create... */
qdb = RecordStore.openRecordStore(
getAppProperty( STORENAME ), true );

/* ... and initialise it */
BufferedReader buffy =
new BufferedReader(
new InputStreamReader(
Connector.openInputStream( INITDATAURL)));

for ( String rec = buffy.readLine(); rec != null;
rec = buffy.readLine())
{
qdb.addRecord( rec.getBytes(), 0, rec.length());
}
}

Note: that's off the top of my head, I haven't tried it.

--
http://www.velocityreviews.com/forums/(E-Mail Removed) (Simon Brooke) http://www.jasmine.org.uk/~simon/

;; in faecibus sapiens rheum propagabit

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
iPhone4,iPhone3,Ipad,Apple Mobile,Blackberry Mobile,HTC Mobile,LGMobile,Motorola Mobile,Nokia Mobile,Samsung Mobile chen selina C++ 0 07-13-2010 08:53 AM



Advertisments