Skip to main content

Push Registry SMS push Problem

1 reply [Last post]
Joined: 2009-05-14

Hii I am Using Static push sms push in my Midlet..

The Midlet registration is like this
MIDlet-Permissions:,, javax.wireless.messaging.sms.receive
MIDlet-Push-1: sms://:6222,mypack.push.TestPush,*

and my startApp() method is shows below

protected void startApp() throws MIDletStateChangeException {
String conns[] = null;
conns = PushRegistry.listConnections(true);
if ( conns == null || conns.length == 0) {
// Not launched due to an incoming message
form1.append("Launched by the user\n");
else {
// Launched due to one or more incoming messages
form1.append("Launched by the Wap\n");
for (int i = 0; i < conns.length; i++) {
form1.append("conns["+i+"]: "+conns[i]+"\n");
} } }

the problem is when midlet start up using sms push or user it displays "Launched by the user\n" ...?
i am using nokia 6131 emulator for testing ..
Any one help me is there is any problem in my midlet registration and startApp() method.......Or wether i have to do something more than this.....

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2008-06-18


there could be a number of reasons why this fails. First of all, please make sure that you are creating an SMS that is sent to the correct port. An ordinary SMS will not work. You could for example have another MIDlet running in another emulator and send it to your MIDlet.

Another problem could be that the emulator does not work correctly. Have you tried your code on a target device?