13 Replies Latest reply: Oct 26, 2010 6:38 AM by 808267 RSS

    difference between  SMS push and MessageListener

    843849
      Hi,

      When a midlet is started, what are the differences between the two following SMS reception mechanisms?

      - mechanism 1 : Push registry
      the midlet has registered in the push registry a SMS inbound connection (staticcaly or dynamically)

      - mechanism 2 : JSR120
      the midlet implements the MessageListener interface.

      In which case, each mechanism is the most appropriate?

      BR,
      Cedric
        • 1. Re: difference between  SMS push and MessageListener
          843849
          Hi,

          There is lot of difference between these two.

          PushRegistry is like system wide hook, when u register ur app with the PushRegistry, the MIDlet will be automatically launched when u recieve an SMS. Its not necessary that ur app should be running.


          But in MessageListener the method will be invoked only when ur app is running.


          Regards,
          Prabhu.
          • 2. Re: difference between  SMS push and MessageListener
            843849
            Hi,

            If u have registered with PushRegistry and if ur app is running then AMS will not do anything special and ur app will recieve the message as usual and method in MessageListener will be invoked.
            • 3. Re: difference between  SMS push and MessageListener
              843849
              Hi,

              I am implementing the push functionality, which mobile is best for testing this feature. I am facing some problems with sagem mobile phones.

              My app is perfectly working with emulators .I was tested with all the emulators including sagem.

              But the App is not triggering when sms arrives to the particular port.

              Would you please any one tell me how to test this feature. Is there any other settings are needed for this functionality, i mean in mobile.

              My mobiles will support midp2.0.

              Sagem myX-7, sagem myX5-2

              Waiting for valuable reply.

              Thanks and regards,
              Raghavendra.M
              • 4. Re: difference between  SMS push and MessageListener
                843849
                Hi,
                the push registry is working only when the application is not active, while the wma only when the application is running. They are mutually exclusive.

                Luca
                • 5. need help in  mobile system development
                  843849
                  mr raghavendra i understand u created a system which can generate notification to mobile phone via sms. i am currently trying to create something similar but am very new to this section of technology. my system that i m trying to create is a system for students in their final year. when the admin submits certain info into the students database the particular student will receive a sms and an email notifying them on the information. i am having trouble implementing this. if you can please do.
                  • 6. Re: difference between  SMS push and MessageListener
                    843849
                    Hi,

                    have tried the same thing with Sagem my-52, it isnt working. have you been able to find anything further. The Push Registry just doesnt invoke the midlet.

                    Respond ASAP.
                    Thanks
                    • 7. Re: difference between  SMS push and MessageListener
                      843849
                      There have been almost three months since the last person posted in this topic.
                      Has anyone been able to actually trigger the MIDlet from sms?
                      I have another question, i'm new to this so forgive me if it's too obvious. Can you deliver an sms to an specific port from any other phone(doesn't matter if it has to be done from an application).
                      I'd really appreciate your help,
                      Ariel
                      • 8. Re: difference between  SMS push and MessageListener
                        843849
                        Hi prabhu_cbe,

                        I am trying to create server push news alerts on my subscribed mobile users running my application. Looking for help how to push a message to mobile, do i need to send request to user to connect my server using GPRS so that i will send them contents (text in start) ? is there any way to invoke the application via simple sms and it will grab contents(text) from that sms ?

                        ur earliest reply will be highly apprciated.

                        Thanks in advance

                        Hamid
                        • 9. Re: difference between  SMS push and MessageListener
                          843849
                          Hi all,

                          Registering midlet using Server Side Push Registery and invoking via SMS:

                          1) Import WMA API (import javax.wireless.messaging.*;) in ur midlet
                          2) Register your midlet against port in AMS (Write code in ur midlet): PushRegistry.registerConnection("sms://:5003", midletClassName, "*");
                          3) Code when AMS activates the ur midlet:
                          **************** CODE **************
                          MessageConnection smsListener = (MessageConnection) Connector.open("sms://:5003");
                          Message msg = smsListener.receive();
                          Form form = new Form("Welcome to SMS Push registry");

                          String data = ((TextMessage)msg).getPayloadText();
                          StringItem stringItem = new StringItem("Message: ", data);

                          smsListener.close();
                          form.append(stringItem);
                          Ticker ticker = new Ticker("Push Activated by SMS at port 5003");
                          form.setTicker(ticker);
                          display.setCurrent(form);

                          4) Send SMS on port 5003 (from J2ME Toolkit -> utilities -> SMS)

                          Note: If you dont wanna show confirmation messages to user, sign ur midlets.

                          I hope the above 4 simple steps will solve the problem of most of people

                          Cheers
                          Hamid
                          • 10. Re: difference between  SMS push and MessageListener
                            843849
                            I don't have:
                            J2ME Toolkit -> utilities -> SMS
                            I'm running Netbeans 4.1 with J2ME Wireless Toolkit 2.2.

                            So how can I send an SMS to a specific port on my phone?

                            I tried adding a Push Registry entry like this:
                            sms://<msisdn>
                            but the installation fails.
                            I tried various options, but it only seems to install correctly if you specify the connection like this:
                            sms://:<port>
                            When I send an SMS to the phone, it doesn't start my App, so I guess the SMS is arriving on the incorrect port?

                            Regards,
                            Enrico
                            • 11. Re: difference between  SMS push and MessageListener
                              843849
                              Our midlet is triggered by SMS sent to a specific port in the device. We just registered a SMS connection in startApp and set its message listener.
                              protected void startApp(){
                                   conn = (MessageConnection) Connector.open("sms://:5001");
                                   conn.setMessageListener(this);
                              }
                              Do not forget to register your midlet statically in the push registry.
                              • 12. Re: difference between  SMS push and MessageListener
                                DarrylBurke
                                jean-chan, please don't post in threads that are long dead and don't hijack other threads. When you have a question, start your own topic. Feel free to provide a link to an old post that may be relevant to your problem.

                                I'm locking this thread now.

                                db
                                • 13. Re: difference between  SMS push and MessageListener
                                  808267
                                  Can anybody tell me how to send the sms on a specific port? I am using Samsung Corby Pro as my GSM modem. I can send the sms also using AT commands. But I dont know how to send the sms on a specific port+* say "16001" (to invoke my MIDlet).