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.
Issue has been solved after signing application ... :) Thanks