11-24-2011 04:21 AM
Hi guys,
I contacted my BE team but during I'm waiting reply I want to ask the community:
Is your onMessage called several times with the same message?
I see in RIM examples code they check that this message is new (not proccesed yet):
public static void process( PushInputStream pis, Connection conn ) {
Logger.log( "Reading incoming push message ..." );
try {
HttpServerConnection httpConn;
if( conn instanceof HttpServerConnection ) {
httpConn = (HttpServerConnection) conn;
} else {
throw new IllegalArgumentException( "Can not process non-http pushes, expected HttpServerConnection but have "
+ conn.getClass().getName() );
}
String msgId = httpConn.getHeaderField( MESSAGE_ID_HEADER );
String msgType = httpConn.getType();
String encoding = httpConn.getEncoding();
Logger.log( "Message props: ID=" + msgId + ", Type=" + msgType + ", Encoding=" + encoding );
if( !alreadyReceived( msgId ) ) {
}
}
Do you have the same check in your app?
Thanks,
Eugen
Solved! Go to Solution.
11-25-2011 07:32 PM
There is no guarantee that dups can be sent to the device but from my experience its quite rare. You'd have to add a message id to the http header when you push the message for it to work.