Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jul 2013

    Strange MIDlet Suite Behavior

    Dear Friends,

    There's a MIDlet Suite and Recordstore problem that I'm experiencing in
    Asha devices - Asha 201, Asha 311, etc. Please let me explain the problem:

    I have a MIDlet suite consisting of two MIDlets: A and B.

    MIDlet A runs and listens for SMS on port 16000 using the PushRegistry
    API and AMS. When it receives SMS on that port, it writes the SMS to a
    named Recordstore. This MIDlet does not interact with user.

    MIDlet B in the same MIDlet suite is started by the user and it opens the
    named Recordstore that was created by MIDlet A and reads the stored SMS
    text message and present to the user.

    MIDlets in the same MIDlet suite are supposed to be able to share the
    same RecordStore for reading and writing. Right?

    When I test the MIDlet suite on S60 device (E51), everything works flawlessly.
    When I test the MIDlet suite on a Blackberry device, everything works flawlessly.
    But when I test on Asha 201 and Ash 311, MIDlet B fails to open and read the
    named Recordstore created by MIDlet A for stored text message.

    If MIDlet B writes the text message to the named Recordstore, then it can open
    and read it back out.

    Has someone else encountered this behavior? I need help.

    Thank you. Sorry for the long explanation.

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2013

    Re: Strange MIDlet Suite Behavior

    I have never needed 2 midlets in the same midlet suite to interact between RMS so no, however
    maybe try the same with this call to creating the record store RecordStore.openRecordStore(String recordStoreName, boolean createIfNecessary, int authmode, boolean writable)
    and in authmode paramater use AUTHMODE_ANY (this would make your recordstore public and accessible to any midlet) use this just for testing purposes if this works to you and AUTHMODE_PRIVATE doesnt work for you then indeed its probably a bug in the Asha implementation however if AUTHMODE_ANY also doesnt work for you then it maybe a bug in your own code.

  3. #3
    Nokia Developer Champion
    Join Date
    Feb 2009
    Noida, India

    Re: Strange MIDlet Suite Behavior

    As per API doc - No locking operations are provided in this API. Record store implementations ensure that all individual record store operations are atomic, synchronous, and serialized, so no corruption will occur with multiple accesses. However, if a MIDlet uses multiple threads to access a record store, it is the MIDlet's responsibility to coordinate this access or unintended consequences may result.

    I can suggest you to merge both of these midlets in one, to resolve this problem on all devices and perform all RMS operations using a synchronized thread to avoid any conflicts and corruption of data.
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

Similar Threads

  1. Strange behavior when altering MIDlet connectivity setting
    By wilhelm4711 in forum Mobile Java General
    Replies: 0
    Last Post: 2009-11-19, 00:12
  2. strange behavior
    By sfahadahmed in forum Mobile Java General
    Replies: 0
    Last Post: 2007-12-12, 18:17
  3. Strange Behavior
    By akermen in forum Symbian
    Replies: 0
    Last Post: 2006-03-15, 01:28
  4. Please help me! Strange behavior...
    By djpirra in forum Mobile Java General
    Replies: 1
    Last Post: 2004-01-17, 12:52

Posting Permissions

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