2

I have designed a j2me application with push registry functionality. I have little issue of error "Conflicting Applications, show items?" while starting the application.

What I did is just added an entry into the Project->Properties->Pushregistry [MIDlet-Push-1: sms://:5051,pushregistry.SendApprooval,*]

My JAD and manifest files are ok and showing these entries, but whenever I make this change application doesn't start and shows the error I mentioned above, but when I remove this step (entry) it works fine, I mean application runs.

My code for the application

public void startApp() {
    String[] connections;
    if (smsconn == null) {
        connections = PushRegistry.listConnections(true);
        if (connections == null && connections.length == 0) {
            destroyApp(false);
            notifyDestroyed();
        }
    } else {
        try {
            smsconn = (MessageConnection) Connector.open("sms://:" + "5051");
            msg = smsconn.receive();
            // If it's a text message, add it to the alert
            if (msg != null && smsconn instanceof TextMessage) {
                alert.setTitle("From: " + msg.getAddress());
                alert.setString(((TextMessage) msg).getPayloadText());
                display.setCurrent(alert);
            }
        } catch (Exception e) {
            System.out.println("IO Exception!");
        }
    }
}

rest of the code is just Strings and Alerts.

My JAD File

MIDlet-1: Midlet,,pushregistry.SendApprooval
MIDlet-Jar-Size: 2250
MIDlet-Jar-URL: pushRegistry.jar
MIDlet-Name: pushRegistry
MIDlet-Permissions: javax.wireless.messaging.sms.send, javax.wireless.messaging.sms.receive, javax.microedition.io.PushRegistry
MIDlet-Push-1: sms://:5051,pushregistry.SendApprooval,*
MIDlet-Vendor: TelVas
MIDlet-Version: 1.0
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.0

Manifest file

MIDlet-1: Midlet,,pushregistry.SendApprooval
MIDlet-Permissions: javax.wireless.messaging.sms.send,   javax.wireless.messaging.sms.receive, javax.microedition.io.PushRegistry
MIDlet-Push-1: sms://:5051,pushregistry.SendApprooval,*
MIDlet-Vendor: TelVas
MIDlet-Name: pushRegistry
MIDlet-Version: 1.0
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.0

What the reason is? I mean if only name issue then it shouldn't run even if I remove the pushregistry entry.

gnat
  • 6,213
  • 108
  • 53
  • 73
Saqib
  • 1,120
  • 5
  • 22
  • 40
  • on what device / emulator do you test? – gnat Dec 18 '12 at 12:22
  • on emulator it works fine, I am checking it over Nokia x2-05, x2-02 – Saqib Dec 19 '12 at 04:21
  • I see. Then it's quite likely nokia bug, check the web for something like "midp Conflicting Applications" or "MIDlet-Push Conflicting Applications", stuff like that. I did that check yesterday, it brought results related to Nokia that's why I asked about what you tested it on – gnat Dec 19 '12 at 07:47
  • ok, let me have a look and will post the results..thanks – Saqib Dec 19 '12 at 10:20
  • I didn't get the solution, all I found is similar type of questions and answers. But what I got is not there! I wonder if someone faced this problem? – Saqib Dec 20 '12 at 13:38
  • that's quite a pity, I haven't heard of this as well. In this case I would maybe try to find _any_ example with push registry that is known to work on your Nokia device(s) and check what's different. Another thing that comes to mind is to find out detailed specs of your device; I just recalled that some push features are specified as optional by MIDP specification, which makes it possible that you just stuck on a feature that is "legally" unsupported - but to know if this is the case, one should probably carefully study specifications for MIDP push and for device – gnat Dec 20 '12 at 13:52
  • good point but I wonder why does Dynamic push registry work then? Because there is no need of entry in Push Registry option in properties! If that was the issue what you said then I guess it shouldn't have worked at all. The issue is in adding properties for push registry entry! That's strange for me too ... – Saqib Dec 20 '12 at 15:27
  • Interesting. Did you check **[PushRegistry MIDP API javadocs](http://docs.oracle.com/javame/config/cldc/ref-impl/midp2.0/jsr118/javax/microedition/io/PushRegistry.html)**? There, section _Installation Handling of Declared Connections_ mentions "Conditions when the declarations can not be fulfilled include: syntax errors in the Push attributes, declaration for a connection end point (e.g. port number) that is already reserved in the device, declaration for a protocol that is not supported for Push in the device, and..." There is also interesting note about failover to dynamic push – gnat Dec 20 '12 at 15:36
  • 1
    yeah gone through that, and I don't think my files format or values look like I misplaced something! The strange thing is one line of push registry entry and everything gets changed. I tried to change the port number too but vain. I am on it lets see what I get finally :) – Saqib Dec 21 '12 at 04:12

1 Answers1

1

Issue has been solved after signing application ... :) Thanks

Saqib
  • 1,120
  • 5
  • 22
  • 40