Hi,
I tried simple HTTP Midlet and it works correctly.
I also did some tests with my N8 and my MIDlet works correctly in it. When I create network connection from another midlet my pushregistery midlet is started.
Could there be only some ports that work on S40 devices? (I did some test but any of random port from range 5 - 70000 didn't work)
Now I have also following permissions in my JAD-file:
MIDlet-Permissions: javax.microedition.io.PushRegistry,javax.microedition.io.Connector.http,javax.microedition.io.Connector.https,javax.microedition.io.Connector.datagram,javax.microedition.io.Connector.socket
Here's my code:
Code:
try {
String dport = "datagram://:5";
PushRegistry.registerConnection(dport, myName, "*");
Alert alert = new Alert("REG OK", myName+":"+dport, null, AlertType.WARNING);
alert.setTimeout(Alert.FOREVER);
display.setCurrent(alert);
} catch (Exception ioe)
{
Alert alert = new Alert("Error", ioe.toString(), null, AlertType.WARNING);
alert.setTimeout(Alert.FOREVER);
display.setCurrent(alert);
}
Any ideas ? =)