Articles and samples about using the BlackBerry 10 or BBOS Push Service.


    • ERROR HttpPushWorker [] - Push Failed The remote server returned an error: (407) Proxy Authentication Required. Exception: System.Net.WebException

      Published Feb 09 2018, 2:20 PM by snunez


      When attempting a server side push from a .Net application, an error 407 Authentication Required Exception is returned. 


      Some machines are setup behind a proxy server and require authentication. The proxy object within your push application does not inherently supply the credentials of the currently logged in user and therefore the proxy refuses access. 


      Add the below element to your .config file 

          <defaultProxy useDefaultCredentials="true"> defaultProxy>


      Within your code, Obtain the proxy of your default browser and assign default credentials of the current logged in user before making your HTTPWebResponse Call.


      IWebProxy myProxy = myWebRequest.Proxy;

                          if (myProxy != null)


                              myProxy.Credentials = CredentialCache.DefaultCredentials;



    • Browser push content is not accessible on BlackBerry devices running BlackBerry 6.0

      Published Feb 09 2018, 2:20 PM by saziz


      When opening a Browser push message or channel on a BlackBerry® device running BlackBeryy® 6.0, you might encounter the following error:




      Browser HTML content that is transcoded by the BlackBerry® MDS Connection Service cannot be rendered by the BlackBerry 6.0 WebKit browser


      Upgrade the BlackBerry® Device Software.  This issue has been fixed in BlackBerry Device Software and higher.




      Disable push transcoding for HTML content by disabling it in the X-Rim-Transcode-Content header sent by the push initiator.




      Push the content URL instead of the actual html content. This will ensure that the content is not transcoded by MDS. However, the push content may not be available to users if they are offline or out of data coverage.

    • php Browser Push Sample

      Published Feb 09 2018, 2:20 PM by msohm



      This article applies to BlackBerry® devices based on Java® technology.







      php can be used to create a simple, transferable web page that can be used to initiate a Browser Push to the BlackBerry® device.  Accessible from any browser, it allows you to send any type of Browser Push using the RIM push format to any user on a BlackBerry® Enterprise Server.  Please see the .zip file at the end of this article to download the sample php application.  This application also uses an html page that contains a form to collect the required push information from the BlackBerry device user.  This is a basic HTML form and is not discussed below.

      The first step in the PHP application is to create the URL that the request will be posted to.


      $path = "/push?DESTINATION=" . $HTTP_POST_VARS['email'] . "&PORT=7874&REQUESTURI=/";



      The destination points to the email address or BlackBerry PIN number of the user to deliver the Browser Push to.  The port number of 7874 is the port the BlackBerry® Browser is listening on for incoming push requests.  Once this URL has been constructed we open a socket connection to the BlackBerry® MDS.



      $besfs = @fsockopen($HTTP_POST_VARS['besHostname'], $HTTP_POST_VARS['besPort'], $errno, $errstr, 30);



      The BlackBerry MDS Server hostname and MDS push port supplied in the html push form are used as parameters to open the socket connection.  If the connection was successfully opened we can start to write out the header information.



      $besBuffer = "POST $path HTTP/1.0\r\n";
      $besBuffer .= "Host: " . $_POST['besHostname'] . "\r\n";
      $besBuffer .= "Content-Location: " . $HTTP_POST_VARS['pushURL'] . "\r\n";
      $besBuffer .= "X-RIM-Push-Title: " . $HTTP_POST_VARS['pushTitle'] . "\r\n";
      $besBuffer .= "X-RIM-Push-Type: " . $HTTP_POST_VARS['pushType'] . "\r\n";



      The standard HTTP request headers are sent along with the two required BlackBerry Push headers.  The URL of the page to be pushed, the push title and push type are retrieved from the html form the user submitted.  If the Browser Push is a Browser Channel or Browser Channel delete, “X-RIM-Push-Channel-ID” is required.  If a Browser Channel Push is being sent the URL of the read and unread icons are specified.  Not specifying a URL for the read and unread icons will cause the device to use its default icons.  The payload to be sent to MDS-CS is stored in a buffer called besBuffer.



      if ($_POST['pushType'] == "Browser-Channel" || $_POST['pushType'] == "Browser-Channel-Delete")
      $besBuffer .= "X-RIM-Push-Channel-ID: " . $HTTP_POST_VARS['pushURL'] . "\r\n";

      //Send the push icon URL's if we are using a browser channel push.
      if($_POST['pushType'] == "Browser-Channel")
        $besBuffer .= "X-RIM-Push-UnRead-Icon-URL: " . $HTTP_POST_VARS['unreadIconURL'] . "\r\n";
        $besBuffer .= "X-RIM-Push-Read-Icon-URL: " . $HTTP_POST_VARS['readIconURL'] . "\r\n";


      The sample then sets any optional headers that have been specified in the main HTML form.  That section of php code will be skipped from this description.  Please refer to the attached sample for the full complete source code.


      Now that all required header information has been sent to the BlackBerry MDS Server we are ready to send the web page we are going to push.  Sending the entire web page would not be required when sending a Browser Channel Delete.



      if ($HTTP_POST_VARS['pushType'] != "Browser-Channel-Delete")

      $webURL = parse_url($HTTP_POST_VARS['pushURL']);

      //Set the port to 80 if not otherwise specified in the push URL.
      if (empty($webURL['port']))
        $port = 80;
        $port = $webURL['port'];

      //Open a socket connection to the webserver hosting the page to push.
      if ($webfs = @fsockopen($webURL['host'], $port, $errno, $errstr, 30))
        $webBuffer = "GET " . $webURL['path'] . " HTTP/1.1\r\n";
        $webBuffer .= "Host: " . $webURL['host'] . "\r\n";
        $webBuffer .= "Connection: Close\r\n\r\n";
        //Send the request to the Web Server.
        fputs($webfs, $webBuffer);

        //Read and discard the first line from the webserver (should be HTTP/1.1 200 OK).
        $firstline = fgets($webfs);

        //Check for a 200 response from the web server.
        //If it is not 200 quite and spit out an error.
        if (!strstr($firstline, "200"))
         //Response code was not 200. Quit and show an error.
         echo "Error accessing URL " . $HTTP_POST_VARS['pushURL'] . ".";
         echo "

         echo $firstline;


        //Read in the page to push from the webserver and write it out to the MDS server.

        $foundBody = false;

        while (!feof($webfs))
         $lineRead =  fgets($webfs);
         //Most of the headers from the web server must be stripped out.
         //Keep the Content-Type header.
         //Keep reading until we find the body of the web page.
         $pos = strpos(strtolower($lineRead), "content-type");
         //Pass the Content-Type header from the web server to MDS-CS.
         if (!$foundBody && $pos !== false)
          $besBuffer .= $lineRead;
          if (!$foundBody)
           $pos = strpos(strtolower($lineRead), "html");
           if ($pos !== false)
            $foundBody = true;
            $htmlBuffer = $lineRead;
           $htmlBuffer .= $lineRead;

        //Calculate the content length and add the content to the besBuffer.
        $besBuffer .= "Content-length: " . strlen($htmlBuffer) . "\r\n";
        $besBuffer .= "Connection: Close\r\n\r\n";
        $besBuffer .= $htmlBuffer;
        //Close the connection to the webserver.

        echo "Failed to connect to " . $HTTP_POST_VARS['pushURL'] . "
        echo "Error: " . $errno . " " .$errstr;

        $keepGoing = false;

      $besBuffer .= "Content-length: 0\r\n";
              $besBuffer .= "Connection: Close\r\n\r\n";



      At this point the push is ready to be sent to the BlackBerry MDS Server.  All that is left is to capture the output from the BlackBerry MDS Server and pass it through to the user performing the push.  A response code of 200 from the BlackBerry MDS Server indicates a successful push has taken place.



      //Send besBuffer to MDS-CS.
      fputs($besfs, $besBuffer);

      $buf = "";

      //Capture the MDS server's reply to the push.
      while (!feof($besfs))
      $buf .= fgets($besfs,128);

      //Display the MDS server's reply.
      echo "Response from MDS:
      echo $buf;


      From the sample code above you can see how little effort is involved in creating a Browser Push application for the BlackBerry device.  Doing so will give you a framework to deploy any type of web application to BlackBerry device users.  Or you can simply place the entire file included in the .zip file below onto a PHP enabled web server to begin pushing to users immediately.


      Note:  To support the recording of push notification information the sample creates and updates a file called notifications.txt, which is located within the same directory the same runs from.  You may need to configure your web server to allow the sample to create a file in this location.  The pushNotifications.php file processes push notifications and writes to notifications.txt.


      Normal   0               false   false   false      EN-US   X-NONE   X-NONE                                                     MicrosoftInternetExplorer4                                                    


      //Read and discard the first line from the webserver (should be HTTP/1.1 200 OK).



      //Read in the page to push from the web server and write it out to the MDS server.

      while (!feof($webfs))


             fputs($besfs, fgets($webfs));


      //Close the connection to the web server.


    • Simplified BIS-Push client sample

      Published Feb 09 2018, 2:20 PM by simon.hain


      This sample covers a simplified client for registering a device on RIM's BIS-Push service.

      The sourcecode was taken and modified from the BlackBerry® Push Service SDK 1.0 which can be downloaded here.



      It does not feature a registration with the content provider.


      As you are not allowed to publish the connection suffix to connect using the BlackBerry® Internet Service, part of the source code must be replaced, similar to your assigned push port and app id (register for them using the link above).


      I advise you to use a logger service when using this code. For simplicity i have replaced all logging calls with sysouts.



      Download the two files, copy them to your project, change the package name, enter your registration info and the connection suffix for the BlackBerry Internet Service.

      Start the registration by calling new PushAgent().

    • Sample code: A simple C# push application

      Published Feb 09 2018, 2:20 PM by gbeukeboom

      Push applications can be created using any development language that is able to initiate a network connection and perform an HTTP post. An HTTP post to the BlackBerry® Mobile Data System (BlackBerry MDS) handles the delivery of pushed data to a BlackBerry device.

      The post is made up of a standard HTTP request header, a few unique Browser Push headers and a stream of data.

      The following additional HTTP request headers are required for a browser push to take place:





      The "X-Rim-Push-Title" header contains the title that will appear either on the Home screen of the BlackBerry device for a Browser Channel Push, or in the subject of the message for a Browser Message Push.


      The "X-RIM-Push-Type" header holds the value that represents the type of push being sent. Possible values are:

      • Browser-Channel
      • Browser-Message
      • Browser-Content
      • Browser-Channel-Delete

      The "X- RIM-Push-Channel-ID" header contains the URL of the page to be pushed to the device. This is not required when performing a Browser Message or Browser Content push.

      The "X-RIM-Push-UnRead-Icon-URL" and "X-RIM-Push- Read-Icon-URL" are optional headers that specify the URL of the icons to be used for a Browser Channel Push. If not specified then the default Browser Channel Push icons are used. These two headers are not required for Browser Message, Browser Content or Browser Channel Delete Push and may be omitted

      This article will show how to create an application to push a URL to one or more BlackBerry device users. For further information, please refer to "Push Me! Pushing web content to BlackBerry" in Volume 2, Issue 1 of the BlackBerry Developer Journal.

      How does the application work?


      When you run the application you will see the screen below.



      Figure 1


      Click the "Open" button to select a file that contains a list of BlackBerry device users with their BlackBerry® Enterprise Server host, port and email/PIN. The following line shows the format of a "User Information File":

      localhost 8080 2100000A

      In this example, localhost is the name of the server that push is being sent to, port 8080 is the web server listen port on that server, and the PIN is set to 2100000A. 

      Note: The "User Information File" must be saved with an extension of ".txt"

      Select the push type to continue and then specify the URL and the push name. If you want a read and unread icon to be published, provide URLs. Otherwise, leave the settings blank.

      Note: Run the MDS Simulator before the BlackBerry device simulator to see the following results.

      When the Send Push button is pushed, you should see the following icon in your simulator screen.


      Figure 2


      Let's get started

      Download and unzip, and then open BlackBerryBulkPush.sln. This is a solution file that includes the setup project and the source project. When you open this project you will see the screen in 3.

      The solution explorer shows six files in the BlackBerryBulkPush Project. The files have the following functions:


      App.configUsed for configuration of logging framework log4net
      App.icoIcon file
      AssemblyInfo.csFile generated by VS .Net
      HttpPushWorker.csPerforms the push operation
      PushDialog.csThe UI for the Bulk Push
      README.docInstallation instructions and known issues as of a certain date

      Figure 3

      The two relevant classes are PushDialog.cs and HttpPushWorker.cs. When the Send Push button is pressed, it invokes the button1_Click event in PushDialog.cs. Let’s review the button1_Click code to see what happens:


      private void button1_Click(object sender, System.EventArgs e)
        int pos,start;
        string BESAddress,BESPort,Email,url;
        string fDelimiter= " ";

        //verifying information is filled correctly
        } else {
          this.PushStatusBar.Text = "Missing Required Fields";

        //checking for correct file (.txt extension)
          IndexOf(".",0)+1,3) != "txt")
          MessageBox.Show("Please enter a file with extension .txt");

        //checking if file exists
        if (!File.Exists(txtFileName.Text))
          MessageBox.Show(this,"Incorrect file name");
          return ;

        //verifying url
        PushStatusBar.Text = "Requesting Page Data";
        HttpPushWorker pusher = new HttpPushWorker
          (ref PushStatusBar,ref url);

        if ( url == "Wrong" )
          PushStatusBar.Text = "Push Failed, bad URL";

        // create reader & open file
        TextReader sr = new StreamReader(txtFileName.Text);

        //reading contents into string variable
        string fContent = sr.ReadLine();

        /*looping thrugh the reader and parsing the BES address,
          port and email from the file*/
        while (fContent != null)
            //looking for " "

            //pushing pos and start variable to parse Address

            //setting start position for port

            //looking for " "

            //using pos and start variable to parse Port

            //setting start

            //using length and start to parse email

            //logging the parsed infomation
              ("Sending: " + BESAddress + " " + BESPort + " " + Email);

            //Verifying the parsed information
            if (verifyFile(BESAddress,BESPort,Email))
              //calling the push method to perform push
                "http://"+UnreadIconURLTextBox.Text, Email);
                ("Error:The file does not have proper formatting");

            //reading line
            fContent=  sr.ReadLine();
          catch(Exception t)
            log.Info("Exception: "+ t.Message,t);
        //closing stream reader


      The method above declares variables and performs field, file, and URL verification and validation. It then passes the Status Bar and the URL by reference to an instance of HttpPushWorker class. A text reader is then created to read through the user file.

      The httpPush method in the HttpPushWorker class is then called to push the web page to the user. Each user information is read and then the URL is pushed. Once all lines have been read from the user file the reader will close the file.


      How the httpPush method performs the push


      public void httpPush(string BESAddress,
        string BESWebserverListenPort, int typeIndex,
        string pushTitle, string url, string readIconURL,
        string unreadIconURL, string pushPin)
        string pushPort = "7874";
        string pushType = PUSH_TYPES[typeIndex];
        status.Text = "Sending Push";

        //Create the push URL for MDS this is of the format
        //  &PORT=&REQUESTURI=/
        string httpURL = "http://"+BESAddress+":"+BESWebserverListenPort
          + "/push?DESTINATION=" + pushPin+"&PORT="
          + pushPort + "&REQUESTURI=/";

        //make the connection
        //we'll put this whole thing in a try/catch block
        //for some basic error handling.
          HttpWebRequest HttpWReq =
          HttpWReq.Method = ("POST");

          //add the headers nessecary for the push
          HttpWReq.Headers.Add("X-RIM-Push-Title", pushTitle);

          if (pushType.Equals("Browser-Channel") ||
            HttpWReq.Headers.Add("X-RIM-Push-Channel-ID", url);
            if (pushType.Equals("Browser-Channel"))
                ("X-RIM-Push-Read-Icon-URL", readIconURL);

          //add some of the headers from the source page
          int headerCount = headers.Count;

          for (int i = 0; i    {
            Console.Out.WriteLine("Adding Header = "+headers.GetKey(i));
            if (headers.GetKey(i).ToLower().Equals("content-type"))
              HttpWReq.ContentType = headers.Get(i);

          HttpWReq.ContentLength = data.Length;

          //Getting Request stream to write data to it
          Stream requestStream = HttpWReq.GetRequestStream();

          //Write the data from the source

          //get the response (this should be HTTP 200)
          HttpWebResponse HttpWRes =

          //Update status on the Status Bar wich Is passed
          //by reference from PushDialog.cs
          if (HttpWRes.StatusCode == HttpStatusCode.OK)
            status.Text = "Pushed";
          } else {
            status.Text = "Push Failed, bad response";
            log.Info("Failed to Push");

          //Close the streams
          status.Text = "Closing Streams";
          status.Text = "Success with "+ timesFailed + " Failures";
        catch(System.Exception e)
          log.Error("Push Failed "+ e.Message,e);
          status.Text = "Push Failed, could not send";


      The httpPush method within the HttpPushWorker.cs class first reads in the source data and then adds it to the push connection. The method will also add all necessary HTTP headers that the BlackBerry® Browser uses to identify this connection as an HTTP push.


      BESAddressAddress (or IP) of the BlackBerry Enterprise Server/BlackBerry MDS
      BESWebserverListenPortPort the BlackBerry MDS listens on for incoming connections
      typeIndexIndex of the push type (PUSH_TYPES)
      pushTitleTitle to use for the push
      urlURL of the source page
      readIconURLURL of the read icon to use (for channel push)
      unreadIconURLURL of the unread icon to use (for channel push)
      pushPinPIN or email address of the BlackBerry device user to push to
      In the method above, the variable PUSH_TYPES is a String array with the following structure
      public static string[] PUSH_TYPES = new string[]{

      PUSH_TYPES is declared in the HttpPushWorker class. After variable declaration, a URL is created that allows the application to perform the HTTP Post necessary to push the page to the BlackBerry MDS and the BlackBerry device. Once created, the connection to the BlackBerry MDS is established, specific headers are added to the request.

      A request stream is then obtained to write source data (web page) to the destination. When the data has been written to the stream, the response from the HTTP request is checked for status 200. The response is used to inform the user about the status of the push. The status is displayed on the status bar in PushDialog.cs.

    • Understanding BlackBerry MDS push process flow and its best practices

      Published Feb 09 2018, 2:20 PM by lwalker


      BlackBerry MDS Push request from a push application to the BlackBerry MDS Connection Service


      When working with a BlackBerry MDS push request, it is important to understand that the Apache Tomcat™ server acts as a front end to the BlackBerry MDS -CS push layer as part of the BlackBerry MDS Connection Service installation. When making a push request, either PAP or RIM, from a push application, the request is first processed by the Apache Tomcat server.

      The Apache Tomcat server has two values, acceptCount and maxThreads, that must be understood when making a BlackBerry MDS push request to avoid receiving a 503 service unavailable response error.

      When making BlackBerry MDS Push requests, the maximum permitted number of simultaneous socket connections is 200. This represents the maxThreads, or worker threads, value of the Apache Tomcat server. Once maxThreads reaches 200, further connection requests are queued and limited by the acceptCount value. When acceptCount also reaches 1000, a 503 service unavailable Apache Tomcat error is received by the push application and is displayed in the Apache Tomcat log files.The log files are stored in the following location by default:

      C:\Program Files\Research In Motion\BlackBerry Enterprise Server\Logs\webserver

      As a best practice, a push application should monitor the maximum number of simultaneous socket connections and queue the pending push requests. For example, when your push application has reached 200 simultaneous socket connections, you should to send a push request only after a thread from the maxThreads thread pool has been released. This makes sure that the pending push requests are queued within your push application and will not overflow the acceptCount.  


      Note: Any Hypertext Transfer Protocol (HTTP) response received by the push application indicates that a worker thread has been released back to the thread pool. For example, when a push application receives an HTTP 200 response, it indicates that a worker thread was released.


        It is important to know that the push layer in BlackBerry MDS-CS is executed by the Apache Tomcat worker thread. If the push request processing rate in the BlackBerry MDS-CS push layer is slower than the incoming push request rate it exceeds the maxThreads and acceptCount  limits, and the application receives a 503 service unavailable error. If the push application monitors the number of active connections and only sends a push request only after worker threads are released, you will not receive a 503 service unavailable error.


      BlackBerry MDS Push request from BlackBerry MDS-CS push layer to a BlackBerry smartphone


      After the push object is passed to the BlackBerry MDS-CS push layer, the worker thread is released to the Apache Tomcat maxThread thread pool and an response is sent to the push application. The Max number of Active Connections field in BlackBerry Manager defines the maximum value of a counter at the BlackBerry MDS-CS push layer. This limits the number of push connections to BlackBerry smartphones connected to the BlackBerry MDS-CS.


      For example, one BlackBerry MDS Push request to ten BlackBerry smartphones increases this counter Max number of Active Connections by ten. This Max number of Active Connections value is decreased when the device push connection is completed (either successfully or not successfully).

      The Maximum Number of Active Connections value is set to 1000 by default and can be changed from the BlackBerry Manager or BlackBerry Administration Service using the BlackBerry MDS settings.

      If the Max Number of Active Connections field reaches the limit, the following error is displayed in the BlackBerry Enterprise Server MDAT log:

       <2009-04-15 14:11:18.339 EDT>:[246]::: <2009-04-15 14:11:56.184 DT>:[27]:::

      There can be many reasons for BlackBerry MDS Push requests to queue at the BlackBerry MDS-CS push layer. For example, one push request can contain a push request to multiple BlackBerry smartphones and results in multiple push connections created to the BlackBerry smartphones. Another example is BlackBerry smartphones that are out of coverage. By default, the BlackBerry MDS-CS queues pending and new push requests for out of coverage BlackBerry smartphones for 10 minutes unless the BlackBerry smartphones come back into coverage within the 10 minute timeout period.


      For additional information on BlackBerry MDS Push flow control search for the knowledge base article Mobile data service push flow control.

    • Browser Push

      Published Feb 09 2018, 2:20 PM by developer_resource

      A great starting point for BlackBerry® developers. By completing the  following labs you will gain understanding on how to push data to the  BlackBerry® Browser as well as how to handle out of coverage scenarios.

      Click on the attachment below to download the lab.

    • Sample applications demonstrating BlackBerry push technology: Emergency Contact List

      Published Feb 09 2018, 2:20 PM by developer_resource




      This article applies to the following:

      • BlackBerry® Java® Development Environment (BlackBerry JDE)
      • BlackBerry® Mobile Data System (BlackBerry MDS)
      • BlackBerry® Browser
      • Proof of Concept Application



      The BlackBerry® Enterprise Solution allows application developers  to build server-side enterprise applications that leverage use push technology  to deliver information to BlackBerry smartphone users. With push technology,  server-side applications can push content securely to the BlackBerry Browser or  to a custom rich-client application on the BlackBerry smartphone. In either  case, enterprise developers can easily build applications that notify BlackBerry  smartphone users when new content arrives, providing up-to-date information and  alerts.


      The Attachments section provides  links to three versions of sample Emergency Contact List (ECL) applications, as  shown in the table below. These versions illustrate how to extract content from  an enterprise database and push it out to the BlackBerry smartphone. They also  illustrate how to push content to an application on the BlackBerry  smartphone.

      ECL Version  Database(s) Utilized  Server-Side Technology  Push Interface  BlackBerry Client Implementation 

      Java ECL

      Microsoft® Excel® Spreadsheet

      Java EE

      Command Line

      Java Application

      Browser Application


      Microsoft Excel Spreadsheet

      Microsoft® Access® Database

      Microsoft® SQL Server®


      Command Line


      Windows® Service - allows the push to be run on a timed basis  (for example, daily)

      Push Access Protocol (PAP)

      Java Application

      Browser Application

      Domino® ECL

      IBM® Lotus Notes® Database

      Java EE

      Command Line

      Lotus Notes Interface

      Java Application

      Browser Application

      Also, these sample applications illustrate how to push to a  BlackBerry MDS Browser Application, and a BlackBerry MDS Java Application.


      The ECL sample applications also introduce how to push content  from an enterprise database or application to the BlackBerry smartphone from a  variety of different server-side application environments. Advanced push  features such as Reliable Push, Delivery Acknowledgements, and Offline Browser  Forms are not illustrated in these samples. For more information on developing  push-based applications for the BlackBerry smartphone, refer to the product  documentation for the BlackBerry  Browser, the BlackBerry  Java Development Environment.


      Additional Information


      Software-tested versions

      BlackBerry Client application


      • BlackBerry® Device Software 4.0 and later

        Note: The BlackBerry Client application can be tested on a device  simulator, but it must be signed before it can be deployed to a live BlackBerry  smartphone. For more information, see this article.



      • Microsoft .Net Server Application   
        • Microsoft .Net Framework 1.1
      • Domino Database   
        • IBM® Lotus® Domino® versions 6.5 and 7
      • Java Command Line Application   
        • Java SE
        • The BlackBerry SDK 1.4.2

    • Push content to multiple BlackBerry device users in a single push request

      Published Feb 09 2018, 2:20 PM by developer_resource



      This article applies to the following:

      • BlackBerry® Mobile Data System (BlackBerry MDS) 4.1
      • BlackBerry device



      BlackBerry MDS Connection Service 4.1 includes two ways to send a single push request to multiple BlackBerry device users.


      1. The first method requires the push application to specify the email addresses or PINs for each BlackBerry device user to receive the push.
      2. The second method allows a push application to push to groups of BlackBerry device users created and maintained on the BlackBerry® Enterprise Server.

      For information on creating and maintaining BlackBerry Groups, see the BlackBerry Administration Guide for BlackBerry Enterprise Server 4.1. The guides are found in the Product Documentation section of and organized by platform and version.


      Note: The BlackBerry MDS Simulator does not support pushing to Groups because Groups rely on other components in the BlackBerry Enterprise Server that are not included with the BlackBerry MDS Simulator. The BlackBerry MDS Simulator supports pushing to multiple recipients using multiple email addresses or PINs.


      For more information about each method, see either Push to Multiple Recipients or Push to Groups, below.


      Pushing to Groups versus Multiple Recipient Addresses

      Groups are administered on the BlackBerry Enterprise Server, so recipients can be added and removed, and the Group maintains its address. The push submission is also smaller, since it does not need to list individual recipients.


      When pushing to a Group address, you cannot determine the status of delivery to a particular recipient or cancel delivery to one or more recipients. If this functionality is required multiple recipient addresses should be specified in the push submission.


      Delivery Notification

      For information on the format of RIM® push delivery notifications when using Groups or multiple recipients, see this article.


      Database requirement

      If BlackBerry MDS is configured to use the centralized push server configuration, then status query, cancellation, deliver after, and replacement features require MDS to be configured to store Push Application Protocol (PAP) messages in a database (e.g. Push.Use.Database = true).


      Push to Multiple Recipients


      A push initiator may specify multiple recipient addresses by including multiple DESTINATION parameters on the query string. The following is an example of a RIM push URL that will send the push to and





      To send to multiple recipients using a PAP push, add multiple address tags. The following is an example:



      address address-value="WAPPUSH=user1%40rim%2ecom%5B%3A7874/">



      If a push is received by a central Blackberry MDS push server that is configured to support multiple recipient addresses and the submission is redirected to a BlackBerry MDS server that does not support multiple addresses, each address is redirected in its own push submission. This allows the use of a central push server to accept a push with multiple addresses and to function with versions of BlackBerry MDS that do not support this feature.


      URL and Header Size Restrictions

      Due to an Apache Tomcat™ limitation, the total size of the URL and headers of an HTTP request is limited to about 3KB. A RIM push request that adds a sufficient number of recipient addresses to the query string might exceed this limit, causing Tomcat to terminate the connection. In this case, the push initiator should send to fewer recipients at one time, or use a PAP push.


      Additionally, for push requests that are redirected from a centralized push server to another BlackBerry MDS server for delivery using RIM push, the URL size limitation can cause a redirection error if enough destination addresses require redirection. This error can occur regardless of whether the original push request used PAP. In this case, the push initiator should send to fewer destinations at a time, or submit the request directly to the BlackBerry MDS server to which the recipient addresses are mapped.


      Push to Groups


      BlackBerry Groups are defined using BlackBerry Manager and are stored in the BlackBerry Configuration Database. Because Group addresses are arbitrary strings, the push initiator must indicate in a push submission the Group addresses among the recipient addresses by prefixing the Group name with the $ character. The following is an example of a URL used to push to a Group named IT using RIM push:







      The following is an example of an address element used to push to a group named IT using PAP:





      Note: In the examples above, the $ character has been URL encoded.


      When receiving a push submission which contains a Group address in a central push server configuration, the central BlackBerry MDS push server forwards the submission to the BlackBerry MDS server instances that corresponds to the BlackBerry Enterprise Server instances mapped to the Group. Each mapped BlackBerry MDS instance expands the Group address into individual addresses that are mapped to that BlackBerry MDS instance.


      Note:  Pushing to groups is not supported if Push Authentication has been enabled.  You are able to push to multiple individuals in a single push request when Push Authentication is enabled.


    • BlackBerry Mobile Data Service push flow control

      Published Feb 09 2018, 2:20 PM by developer_resource



      This article applies to the following:

      • BlackBerry® Mobile Data System (BlackBerry MDS)
      • BlackBerry smartphones based on Java® technology


      BlackBerry MDS contains built-in flow control used when pushing  data to a BlackBerry smartphone.

      BlackBerry MDS starts by sending, at most, 5 initial packets. As  these packets are acknowledged and more packets are sent, a constant window of  no more than 5 pending packets is maintained.

      The default packet size depends on  the BlackBerry MDS version. The default package size is 29 KB for BlackBerry MDS  1.0, and 8 KB or 2 KB for BlackBerry MDS 1.1.

      The packet size is configurable using the IPPP.Datagram.Maxsize parameter in the file. Thisfile is located on the  BlackBerry MDS Server in the following directory:

      C:\Program Files\Research In Motion\BlackBerry  Enterprise Server\MDS\Servers\SERVER\config

      Once you open the file you can add the IPPP.Datagram.Maxsize parameter  and set its value. The following example sets this value to 29 KB:

      IPPP.Datagram.Maxsize = 29 696

      If BlackBerry MDS has queued five packets and the BlackBerry  smartphone does not respond (for example, the BlackBerry smartphone is outside  the network coverage area or is turned off), the packets are queued for 10  minutes. This time value can be configured on the BlackBerry® Enterprise Server  under Flow Control Timeout. By default, the Flow Control Timeout value is set to10 minutes. This means that after 10 minutes the packets are  cancelled and any outstanding packets in BlackBerry MDS are discarded. This  event is identified in the MDS-CS log files as error message 30371, "Packet  cancelled locally".In BlackBerry Enterprise Server software version 4 this  parameter can be found in the BlackBerry Manager under BlackBerry MDS Connection Service -> General -> Flow Control  -> Flow Control Timeout. In BlackBerry  Enterprise Server software version 5 this parameter can be found in BlackBerry  Administration Service under BlackBerry MDS Connection Service  -> Servers and components -> BlackBerry Solution topology-> BlackBerry  Domain -> Server view -> BES_Server -> BES_Server_MDS-CS - > General  -> Flow Control -> Flow Control Timeout.

      The advantage of increasing the Datagram.MaxSize parameter is that larger amounts of push data can be  sent in a packet. However, if the BlackBerry smartphone is out of the network  coverage area, 5 larger packets will be queued. This means more memory is  required on the BlackBerry MDS Server. The flow control timeout parameter  defines how long data can be queued. A larger flow control timeout will also  require more memory in case the BlackBerry smartphone is out of the network  coverage area because packets will be queued longer in memory. If both  parameters are increased, the impact on memory usage is even  greater.

    3 pages