×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Dec 2006
    Posts
    34

    Is it possible to update a record from a MIDlet's RMS?

    I need to transfer small bits of data (strings) from a python script that will do some native related stuff to a J2ME midlet.

    Simply reading a file from a MIDlet is troublesome since the user is required to grant access everytime when reading a file if the application is unsigned. In my application, this will be done once every 30 seconds or so.

    The only other way of communication between the python script and the J2ME MIDlet is AFAIK to add a record in the .db RMS file generated by the MIDlet. The only problem is that I don't know how to decode this file. Is there any interpreter from python that will help me update a record from the .db file?

    I am at core a Windows Mobile platform developer. I have recently started to work with the Nokia's tools therefore correct me if I am wrong: in my searches I have found tons of people trying to access native methods from J2ME. The communication via the RMS .db file could be considered a bridge between Symbian C++ / Python apps and J2ME applications. I am sure that there are a lot of people such as myself that are used to working in a visual envoirement and only use C++ strictly for the hard stuff keeping the UI and the most of the application in envoirements such as J2ME.

    Your help on this matter will be greatly appreciated!

  2. #2
    Super Contributor
    Join Date
    Dec 2004
    Posts
    643

    Re: Is it possible to update a record from a MIDlet's RMS?

    One method people have used previously for communicating between a background Python process and a Java app is local TCP sockets: Have the Python process set up a socket server that listens on the local interface and have the Java app connect to that.

  3. #3
    Registered User
    Join Date
    Dec 2006
    Posts
    34

    Re: Is it possible to update a record from a MIDlet's RMS?

    Wouldn't that take more resources out from the handset? I mean it would be very elegant to write in the RMS and then use every day J2ME methods to access the data.

    I have found this post - http://discussion.forum.nokia.com/fo...&highlight=rms about reading from the RMS.

    I have no experience working with e32DB, can anyone give me an example on how to update a record from a given table?

    In the mean time I will explore the sockets approach, however I would prefer to work with the RMS if possible.

    Thank you for your answer.

  4. #4
    Super Contributor
    Join Date
    Dec 2004
    Posts
    643

    Re: Is it possible to update a record from a MIDlet's RMS?

    Could you tell more about what exactly you are trying to accomplish?

  5. #5
    Registered User
    Join Date
    Dec 2006
    Posts
    34

    Re: Is it possible to update a record from a MIDlet's RMS?

    Like I said in my previous post, I need to pass some info from a python script to a J2ME app. I have written a communication application both under Windows Mobile and J2ME, and now I want to add support for location based information in my J2ME application (WM version already has it). I know that this can't be done soley under J2ME because of the sandbox limitation and I've noticed that python has the awesome gsm_location function. I just need to pass the gsm location string from python to J2ME.

    Anyway, upon further reflection on this issue, a socket approach actually serves me better because I need to make my python script run as a Symbian process of some sorts that will automatically start on OS startup.

    The J2ME side is simple:

    conn = (StreamConnection)Connector.open(“127.0.0.1:8100”);
    is = conn.openInputStream();
    os = conn.openOutputStream();
    os.write(“getlocation”.toBytes());
    os.flush();
    byte[] data = new byte[maxlen];
    int actlen = is.read(data);
    //from Extending the Reach of MIDlets: how MIDlets can access native services

    I need a little help with the python script that will send location.gsm_location() when "getlocation" arrives.

Similar Threads

  1. update rms via ota
    By kevin1964 in forum Mobile Java General
    Replies: 2
    Last Post: 2006-02-21, 07:32
  2. Size limit of a single RMS record ?
    By civax in forum Mobile Java General
    Replies: 0
    Last Post: 2005-12-27, 12:55
  3. Deleting a Record (RMS)
    By clv2k2 in forum Mobile Java General
    Replies: 2
    Last Post: 2003-10-03, 13:31
  4. Bugs on delete record on RMS for 3650 device
    By dssnokia1 in forum Mobile Java General
    Replies: 6
    Last Post: 2003-09-29, 13:50
  5. 3410 rms record store exception
    By hadam in forum Mobile Java General
    Replies: 1
    Last Post: 2002-11-07, 09:36

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×