×

Discussion Board

Results 1 to 5 of 5

Thread: Inbox of 6600

  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    4

    Inbox of 6600

    Hi Dear friends
    I want to write a java program on my Nokia6600 so that I can receive norrmal messages. Is there any way to catch messages before they go to the inbox? Or is there any way to read from the inbox?
    Thanks

  2. #2
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    150

    Wink Re: Inbox of 6600

    Hi s_aliakbary, I think that this snippet of code will clarify your doubts!

    1) Define your application (MIDlet) as implementing the MessageListener interface. public class WMAMIDlet extends MIDlet implements MessageListener

    2) Define a notifyIncomingMessage() method within your MIDlet class. Recall that you must minimize the amount of processing within this method.

    /**
    * Asynchronous callback for inbound message.
    * @param conn the MessageConnection with incoming Message
    */
    public void notifyIncomingMessage(MessageConnection conn) {
    // Dispatch a single-pass message processor for each
    // incoming message.
    MessageProcessor mp = new MessageProcessor(conn,
    _singlepass);
    }


    3)Register a MessageListener for the server MessageConnection, when you initialize the application in startApp(), or when necessary.

    /** Initial state */
    public void startApp() {
    // ...
    // ...
    // Create a server MessageConnection
    if (mc == null) {
    try {
    // Open the messaging inbound port.
    mc = newMessageConnection("sms://:5000");
    // Register the listener for inbound messages.
    mc.setMessageListener(this);
    }
    catch(Exception e) {
    System.out.println
    ("startApp.newMessageProcessor" + e);
    }
    }
    // ...
    }// Using a MessageConnection Listener to Process Messages

    Don't forget to de-register your message listener during cleanup, in destroyApp(), by passing null as the parameter to setMessageListener().

    try {

    if (mc != null) {
    mc.setMessageListener(null);
    mc.close();
    }
    }
    catch (IOException e) {
    // Handle the exception...
    }

  3. #3
    Registered User
    Join Date
    Sep 2006
    Posts
    4

    Re: Inbox of 6600

    Does it work for normal SMSs? I mean for SMSs sent by a usual self-phone, not by a j2me program. In other words I don't want to use a special port for receiving messages.
    Regards

  4. #4
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    150

    Arrow Re: Inbox of 6600

    Quote Originally Posted by s_aliakbary
    Does it work for normal SMSs? I mean for SMSs sent by a usual self-phone, not by a j2me program. In other words I don't want to use a special port for receiving messages.
    Regards
    Hi again s_aliakbary! Sorry for my delay!

    I'm afraid of this code only works if you wrote the message inside a J2ME program and besides, if the port which is used in the messaging sending code was the same that the messaging server's port: 5000 in this case!

    I'm looking into this topic and if I find out something interesting I will keep you informed!

    I hope you to do the same! ---

  5. #5
    Registered User
    Join Date
    Sep 2006
    Posts
    4

    Re: Inbox of 6600

    Hi again.
    Ok, I'll do that. Thanks

Similar Threads

  1. NOKIA 6600 INBOX CONTACT NAME NOT SHOWING!?!? HELP
    By Murraym666 in forum General Messaging
    Replies: 1
    Last Post: 2006-04-27, 14:26
  2. Nokia 6600 questions
    By peterxrogers in forum Mobile Java General
    Replies: 1
    Last Post: 2004-08-04, 15:45
  3. Replies: 1
    Last Post: 2004-02-20, 07:54
  4. Inbox wont show contact name (6600)
    By tommygunn in forum General Development Questions
    Replies: 1
    Last Post: 2004-02-15, 00:11
  5. Replies: 2
    Last Post: 2004-01-03, 09:38

Posting Permissions

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