09-30-2010 04:39 PM
I've banged my head at the wall a few times trying to make BlackBerry BIS push work for me. I even managed to register with 5.0 Push API (SERVER_TYPE_NONE with no server url) and got back STATUS_ACTIVE in my onStatusChange(). The problem was, our server person did not see anyone subscribed. Trying SERVER_TYPE_BPAS with http://pushapi.eval.blackberry.com produced a STATUS_FAILED with REASON_NETWORK_ERROR for reason and IllegalArgumentException for error.
I then decided to go by the book - BlackBerry Development Fundamentals by John M. Wargo (replacing https: with http: as suggested in several places here on the forums). My second PD_subReg request produced rc=10001, which means (by the same book) "device PIN is missing or invalid". I also started a Thread listening on the RIM-provided port (shamelessly stealing from httppushdemo), but it is no good without proper registration first.
Our server person went by the same book on the server side, registering on https://pushapi.eval.blackberry.com and getting a success return code. He can send to a specific PIN or to "all" but sees no one subscribed.
What is the best way to push successfully?
10-01-2010 10:24 AM - edited 10-01-2010 10:49 AM
After some pondering, I realized that we are using our custom HttpConnection - we open the socket ourselves and try reusing it as long as the request is for the same server using the same protocol. This enabled a much better performance than with the built-in HttpConnection so we stuck to it.
However, we might be missing some HTTP headers which the built-in HttpConnection is adding. Is there any special header containing the device's PIN used by the BlackBerry infrastructure? This is probably for one of the RIM employees to answer...
10-05-2010 02:34 PM
Well, I've tested it heavily over these days and it seems RIM infrastructure extracts device PIN from something other than HTTP headers - most probably its data service layer. So the question still stands - what is going wrong?
02-02-2011 05:02 PM
In your URL, are you appending the connection suffix String so that you connect over BIS-B? The push registration must be done using this transport.
02-02-2011 05:22 PM
Agree with the poster above - you need to ensure you are going through BIS-B. The 10001 usually happens when you are not going through BIS-B which as you correctly deduced injects the PIN that is used by BlackBerry Push Service. You can't put the PIN in the header yourself - it won't work.