Persistence of data in J2ME mobile device using RMS

Hi. Just want to ensure that RMS can let us store some values in the mobile device. I'm using emulator to try this out. Everytime i close the emulator, the data stored in the RecordStore's gone. How about in real mobile device?
For some reasons, my jad and jar can't be installed in my Nokia 6210. It keeps giving me "Invalid Jar file" error.
So, my main question is whether RMS really stores the value in the mobile device and can be retrieved everytime that MIDlet app's run again.
The other question is why is it that my jar can't be installed in my Nokia 6210? I just built it with NetBean with J2ME and it could be run on the emulator perfectly.
Thanks a lot.

Hi. For the installation to my phone, i have solved it by changing my app's MIDP version 2.1 to 2.0.
For the persistence of data part, i changed the Storage->"Storage Root Directory" to "\save" in Preferences of SJWTK and re-run my app on the emulator and my phone. However, it seems that the record store's data is not persisted. So, i assume it has something to do with my code. My code is as below. Can anyone give me some clues on what i have done wrong? Thanks.
public TheConstructor(MIDlet midlet, Form form, int partnerId){
     try
      // The second parameter indicates that the record store
      // should be created if it does not exist
        rs = RecordStore.openRecordStore(REC_STORE_NAME, true );
        if (rs.getNumRecords() == 0) {
            RecordIdParam = getAdsParam();
            if (clientIdParam.length > 0) {
                clientId = RecordIdParam;
                writeRecord(RecordIdParam);
                readRecords();
                closeRecStore();  // Close record sto
        else {
            readRecords();
            closeRecStore();  // Close
     catch (Exception e)
      db(e.toString());
private void db(String str)
    System.err.println("Msg: " + str);
  public void closeRecStore()
    try
      rs.closeRecordStore();
    catch (Exception e)
      db(e.toString());
   public void writeRecord(String str)
    byte[] rec = str.getBytes();
    try
      rs.addRecord(rec, 0, rec.length);
    catch (Exception e)
      db(e.toString());
  public void readRecords()
    try
      // Intentionally make this too small to test code below
      byte[] recData = new byte[5];
      int len;
      System.out.println("num of records is " + rs.getNumRecords());
      for (int i = 1; i <= rs.getNumRecords(); i++)
        if (rs.getRecordSize(i) > recData.length)
          recData = new byte[rs.getRecordSize(i)];
        len = rs.getRecord(i, recData, 0);
        RecordIdParam = recData;
    catch (Exception e)
      db(e.toString());
  }

Similar Messages

  • Even though iOS cannot restore backups of newer devices, can it restore data from an older device using 7.1.2 to a newer device using iOS8

    iPhone 4s 16GB running iOS 7.1.2. Even though iOS cannot restore backups of newer devices, can it restore data from an older device using 7.1.2 to a newer device using iOS8

    Hi ,
    Welcome to the Apple Support Communities!
    I understand that you cannot use your Wi-Fi after the latest update to your iPhone 4s. I know you have already done some great troubleshooting by restoring with iTunes but the Wi-Fi becomes unavailable very quickly after you set it up. Go ahead and set up the iPhone so you can get into the Setting and then follow the steps provided in the attached article.
    iOS: Wi-Fi settings grayed out or dim
    http://support.apple.com/kb/ts1559
         Resolution
    Follow these steps to resolve the issue:
    Restart your iOS device.
    Make sure that airplane mode is off by tapping Settings > Airplane Mode.
    Reset the network settings by tapping Settings > General > Reset > Reset Network Settings.
    This will reset all network settings, including Bluetooth pairing records, Wi-Fi passwords, VPN, and APN settings.
    Make sure that your device is using the latest software. To do so, connect your device to your computer and check for updates in iTunes.
    If you complete all of these steps and still are not able to access the Wi-Fi, it may be necessary to follow the link at the bottom of the page and contact Apple Support.
    Have a great day,
    -Joe

  • Deploy Symantec certificate profiles to mobile devices using Microsoft Intune to manage company resources like WiFi

    We are planning to deploy Symantec certificate profiles to Mobile devices to manage company resource like WiFi. I've seen documentation on Technet and the post here http://ronnydejong.com/2014/12/15/part-1-deploy-certificates-to-mobile-devices-using-microsoft-intune-ndes-overview/ that
    we need to install Intune NDES connector which needs to be installed on NDES server. These docs are true when we are using Microsoft PKI.
    Here, we're planning to use Symantec cloud PKI to deploy the certificates to mobile devices. So, I would like to know which are the required on-premises components ? NPS, NDES  or something else? Any documentation URL would be helpful ;) We're in planning
    face hence the question in the forum. 
    Regards
    Anoop
    Anoop C Nair (My Blog www.AnoopCNair.com)
    - Twitter @anoopmannur -
    FaceBook Forum For SCCM

    Thank you Jason for the reply !
    Sorry for stupid questions !
    Does that mean, NDES is needed only for initial enrollment process of a mobile device? We don't need it deploying Symantec certificate profiles to manage company resources like WiFi VPN etc... Or I'm totally lost here? 
    My understanding is : Mobile devices will get enrolled to Intune and that device will become a managed device. Now, the mobile device needs to get a connectivity to company resources like VPN or WiFi and for the we may need to deploy certificate profiles.
    Isn't it ? So, you were saying for this process we don't need to have NDES. (or I'm wrong here as well).
    If so, we'll be deploying a public certificate to all the devices via certificate profile deployment and the devices need to get connected with issuing authority to get a device specific private key before connecting to WiFi or VPN?
    Regards
    Anoop 
    Anoop C Nair (My Blog www.AnoopCNair.com)
    - Twitter @anoopmannur -
    FaceBook Forum For SCCM

  • Creation of a database engine for mobile devices using j2me

    am trying to develop a database engine for mobile devices.. it is to develop a miniature version of the DBMS that
    can be deployed on a mobile phone..I have to develop my own code for performing tasks such a s creating a table,
    inserting values into it, selecting from it etc..
    I limited my self to develop the software so that it can perform 3 functionalities of create, insert,select..
    I should be taking the details such as table name and its parameters from the user and then should be able to
    create a suitable data structure for it(i tried to develop a class)...
    Usage of RMS package helps me partially in this.. I did that and ll be doing that..
    I got stuck while developing the code for creation of a table.. I am facing problems in creating a dynamic data
    structure for a table and also to use such data structure else where in my project..
    I need help in developing an algorithm for this..
    I would be very grateful to u all if u help me out in developing the code for this project..

    I'm sorry for the amount of time it took me to get back. Derby is an open source database written entirely in Java. I do not know if it can support resource constrained devices like MIDP compliant, but may work okay with CLDC.
    But outside of Derby being a solution, let me give you a few ideas off the top of my head.
    Set up a database server in a separate thread. This server will really be your controller for RMS access.
    Since RMS is just a big sequential 'pipe' you will have to think of data as 'frames' - (starttable) (tableID) (tablename) (data) (tablename) (data).....(endtable).
    When you need to write additional data, just append it to the end of the RMS object.
    When you need to retrieve data, thing are more complex.
    1. Read in all data, looking for your particular tableID. This may be made much easier using RMS filters - (I'm not sure, I've never used them)
    2. Once start of table of interest is found, stick the data elements in either a java vector or array until you reach the table end identifier. I think vector will be a better choice - trust me. (I think its available in J2ME...)
    3. Package this into a do while loop until the element you are searching for is read. If you need to do some sorts on the data or something else that requires the all the data to be present then you need all the data for that particular table. One thing will always be clear. The first data you grab will always be some start table identifier and the last data you grab will be an end table identifier. We just don't know which table because of how we put stuff in the RMS resource.
    This provides you a few positives as well as negatives:
    Positive:
    1. Fast data writes, no need to search for a particular table before accessing it, nor do you need to search for an index in that table.
    2. When looking for data, data may* be found without searching through the entire table. This is accomplished with RMS filters or logic test within the RMS read loop.
    Negative:
    1. Slow when all data of a table is needed (i.e. compute sums or averages of entries). The entire RMS database must be read to ensure all the entries are searched. An example of how this is a problem is as follows: You have 5000 entries in you RMS database resource and you are looking to compute the average of a value in some table. When you first wrote the data to the table, it was done sequentially and no other data for that table exist. But we can't tell if that's the case, so we have to read through all 5000 entries to make sure we looked for every piece of data.
    Beacuse of this issue, this database structure, performance may be fine for 50K - 100K entries (depending on table element size), if the reading requirements don't force full data reads. Otherwise, 25K may be an upper limit.
    I hope this helps.
    Edited by: estarkey on Mar 17, 2009 9:15 PM
    Edited by: estarkey on Mar 17, 2009 10:01 PM

  • Not getting Data on to Mobile Device

    Hi All,
    We have configured MAM3.0 SR05 Laptop version. The application is working fine with some users and not getting any data on some other users. Even we are able to see that data in the backend and middleware using MEREP_MON. Even it shows status message as success in the outbound worklist monitor. We are maintaining same roles, profiles and authorizations for all the users and same versions. Why some of the users are unable to see any data on their Laptop. Any help would be highly appreciated.
    Some more information.
    Backend: ERP 6.0 with SP15.
    Middleware: NW7.0 with SP15.
    Mobile Client Details:
    MOBILEENGINE_JSP  Framework  70150 
    DB2E  DB2e  9.1.2 
    MAMLAPTOP  MAM Application  SR05
    LOCALHOST  Local Host Add-on  
    Thanks in advance.
    Regards,
    Scott.

    Hi Scott,
    if ou say you have no data on the device? Well, there are a few things to clarif first:
    I expect you can start MAM on the client at all.
    If you start MAM, can you see the initial screen with two Menu entries or are there all menu entries available (for orders, notifications,etc....)
    It can be that you are lacking some settings in SPRO for this specific user or the scenario for this user is not correct in SPRO. Compare these scenarios with the users that are ok.
    Check if the dataset in MAM30_090 and MAM30_095 is okay on device and in MAM30_090_GETLIST/GETDETAIL for this user. This is the most necessary dataset. If you do not get this - you will never see MAM30_001 for example on the device - even if it is there.
    Hope this helps to get you a step further.
    Oh - just a quesiton - if it is only on a few devices. check if the users have appropiate rights on these machines. DB2e for example stores files in the Windows directory. So if you are not allowed to write into the Windows directory -- well -- you will not get any data down to the device. Check the log fiels and you will see some errors there - most likely!
    Regards,
    Oliver

  • How do I get sync data from my mobile device to the new hard drive in my computer?

    My hard drive crashed and I need to get my synced data back and the instructions for doing so aren't adequately explaining how to do so.
    I have my mobile device in my hand, which has my Firefox data on it. I can't find the sync key. It is telling me to go to "sync options" on my mobile device, but that isn't available on my mobile device.
    I just want to have my bookmarks. My hard drive crashed and I am having enough problems without not being able to sync my firefox data to the new hard drive.

    Hi!
    You can recover yous Sync Key from your phone with this add-on: https://addons.mozilla.org/en-US/mobile/addon/aboutsynckey/
    Install it in your phone so it can display your Sync Key (also know as recovery key).
    Once you do that, follow this steps: [https://support.mozilla.com/en-US/kb/How%20to%20sync%20Firefox%20settings%20between%20computers#w_what-if-im-not-near-my-first-computer Set up Sync in your Computer with the Sync Key]

  • Upload image from Mobile device using SAP ui5 controls

    Hello Team ,
    Can we use SAP UI5 controls to upload image from photo gallery of the mobile device, the idea is to use simple sap UI5 codding and not SMP.
    please do let me know if you guys have idea on same.
    Armaan 

    Hi Armaanjit,
    Please have a look at my post
    File upload using SAPUI5 Control

  • Does anyone have any idea of why itunes uses 50% and Apple mobile device uses anther 50% computer usage ?

    When I plug in my iphone my CPU goes to 100%. 50% itunes and 50% Apple mobile device. when trying to shut down, MD crash report uses 50% CPU

    Since upgrading to iTunes 10.5....which doesn't work correctly yet....Apple Mobile Devices Services is typically running at 50% or greater
    Did you gettting any answers????

  • How to cpture video from mobile device using MMAPI?

    Dear freinds
    Q1:-
    I am working on a project that require capture image from mobile device (Cell Phone) but in J2ME Wireless Toolkit their is no any code example to do this .
    Q2:-
    Is this possible that i cn plug web cam to capture image from emulator
    if yes than please replay me with code example

    Well i am pretty certain i need to develop a java code which would allow the same. But i was looking forward if anyone knows about any API which have certain interfaces exposed which would support this type of communication. Like you can get code sniplets for SMSC which allows SMS to be sent from application to any mobile phone i was thinking might be some help would also be available for the reverse.
    Or if there are any tutorials available on net which might be of some help then please share.
    Thanks

  • Apple mobile device use all cpu

    After I have updated to Itunes 10.5 apple MobileDevice use all my cpu,I tried to uninstall all apple programs and reinstall them but the problem appears again.
    To uninstall and reinstall fixed the the same problem with itunes 10.4.
    I hope someone is able to help me.

    The CPU has been resolved after reading other posts:
    From the command prompt, enter: netsh winsock reset
    Then reboot computer.
    My Sony Vaio runs faster, all Apple Mobile Device issues are gone, and iTune starts up instantly and syncs my iPad and iPod,
    Funny thing is the guys at the Apple Store Genius Bar couldn't come up with this. In any case, hope this helps another reader.....

  • How do I get my iCloud account to sync with the data on my mobile device?

    I recently erased my hard drive in my iMac and did a clean install of Yosemite. My iPad and iPhone have my contacts on them ,but my iCloud account and my iMac only have the contacts that I've added manually. How do i get the contacts from my mobile device(s) into iCloud and o

    nto my iMac?

  • SAP AII 5.1 Transactions from Mobile device - Using SAPConsole

    Hi Friends ,
    1 . From Mobile devices [ SAPConsole enabled ]  , can we execute all SAP AII 5.1 transactions ( Like Tag commissioning, decommissiong , Packing ,Loading etc ., ) ?
    2. We specifilcally looking for 2DBarcode and Liner barcode not for RFID .So, will it fulfill our needs ?
    Please provide some inputs and it would  be great if you provide some help links  .
    Regards.,
    V.Rangarajan

    Hi Henrik,
    Did you find the solution to your problem ?
    I'm facing the same issue, so I'd be pleased to know the solution!
    Regards
    Stekam

  • How much data does the mobile hotspot use?

    I am trying to figure out how much data the mobile hotspot will use?  I do not have a lot of data on my plan and don't want to go over.  Any ideas?

        Hi wenfam!
    That's a great question! Data usage can differ depending on how the device is used. Here's a helpful link on how to monitor the usage: http://is.gd/52jiNm ^CB

  • I cannot see Pages documents on my mobile devices using iCloud

    I have followed all the instructions but nothing!
    I have switched pages on in Settings - icloud - documents and data
    I have checked that all devices are using the same Apple id and password
    I have reset documents and dta in the advanced account settings
    I have spent two hours try ing to solve this, please please please help
    Steve

    Gail, you are wonderful! That solved the problem. My Keynote docs are now downloading, and the docs I created with Pages on my Mac now open on the Mini.
    Muuahh!
    gail from maine wrote:
    Do you have "Documents and Data" checked in iCloud on both the Mac and the device?
    If you do, then try resetting your iPad (nothing will be lost) and trying again: Hold down both the Home and Power buttons at the same time and continue to hold them down until the Silver Apple appears (up to 30 seconds). Once the Home screen redisplays, see if you can open your document.
    Cheers,
    GB

  • Trying to get data from a bluetooth device using labview. Can anyone help?

    I am currently working on a project to monitor pulse rate and need send the reading via bluetooth. My laptop is bluetooth enabled and is using a toshiba stack. I am new to LabView and need some help with this.
    Message Edited by Iceberg D4 on 05-05-2009 10:58 AM

    You can definitely do this using LabVIEW. Search for labview bluetooth on NIs website to look for articles and documentation with regards to this. One thing I noticed and would like to point out:
    On Windows XP - LabVIEW works with Bluetooth devices that use the Microsoft Bluetooth
    driver included with Windows XP Service Pack 2 and later. Refer to the
    Microsoft Web site for Bluetooth devices that are supported by the
    Microsoft Bluetooth driver. Most Bluetooth devices come packaged with a
    proprietary Bluetooth driver. To use the device with LabVIEW, the
    Bluetooth adapter must be using the Microsoft Bluetooth driver. A
    Microsoft Bluetooth driver for Windows XP SP1 was also available. Refer
    to Microsoft Knowledge Base Article 323183: Availability of Windows XP Service Pack 1 Support for Bluetooth Wireless Devices for more information about Bluetooth-compatible operating systems.
    Have a look at the following:
    http://zone.ni.com/devzone/cda/tut/p/id/3260
    http://zone.ni.com/reference/en-XX/help/371361E-01/lvcomm/bluetooth_vis/
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

Maybe you are looking for

  • Poor LV6.1 webserver performanc​e

    Hi! I want to use the LV6.1 webserver to serve a static html site including some front panel images. All works as expected except the very poor performance even on the local system. I first suspected PC/WIn configuration problems but since two other

  • From IPod windows to Macbook Pro

    How do I transfer my IPod 30G songs and pics to my new Macbook Pro, my IPod is using windows.

  • Win 7 OS Re-install (HP Pavilion dv6 Entertainm​ent Notebook PC series)

    Hi I have problem re-install windows 7 on the laptop. I installed Linux on the computer. and want to re-install windows 7 on it. but have problem finding the right AMD Sata driver for my laptop. when i use lspci -vl in ubuntu i get that i have AMD SB

  • What is the pitch for?

    On garageband, on the bottom lefthand corner, beside the plus button, is a button that brings up things dealing with pitch and stuff. what is this for and how do you use it?

  • Problem with usb boot on Satellite A-50

    Hi, I've had a problem with usb boot. When I'm inserting a usb, I can't boot my computer from usb. I've selected the option boot from a disk, but doesn't runs. I have a "Satellite A-50-522". Do I need to update bios? Greetings,