05-21-2013 12:14 PM
My Cascades client needs BES10 push(only enterprise).
It creates PushService with "205" as applicationId, but can't create channel.
m_pushService = new PushService(providerApplicationId, INVOKE_TARGET_KEY_PUSH, this);
//providerApplicationId = "205"
//targetKey = "com.example.pushCollector.invoke.MYpush"
m_pushService->createChannel(QString("")) gets error 10102 which means:
" PpgUrlMissing = 10102
Indicates that a PPG URL was not specified while attempting to perform a create channel operation.
This result code can occur from any of the following PushService operations: createChannel().
Recommended action: This usually means a programming error in the application. Make sure that a PPG URL is specified when performing a Create Channel operation."
Please help with correct initialization of PushService for BES10 push using old "port" method.
thanks at advance
Solved! Go to Solution.
05-27-2013 11:16 AM
I too am struggling to get a BB10 BES only push application working.
According to the documentation, you should not need to specify a provider ID for BES connection, but when I did that I got a 10002 attempting to create a connection. Now that I have the connection, I get a 10102 like you trying for the channel.
I have posted a similar question in the Push Service forum, hopefully someone in one place will be able to help.
05-27-2013 10:31 PM - edited 05-27-2013 10:34 PM
In the bar-descriptor.xml, do not request _sys_use_consumer_push permission
<!-- permission system="true">_sys_use_consumer_push</permission -->
Set the AppId to the port
m_pushService = new PushService("205", INVOKE_TARGET_KEY_PUSH, this);
Set the PPG Url to null in createChannel
05-28-2013 06:56 AM
Thanks for this.
I have actually started receiving requests when I specify the port 7874. Nothing else seems to work. I used 7874 since a review of the MDS logs suggests that is the port that it always uses.
So can you tell me how you managed to make the port number work? I would love to be able to use this since it would provide us with a way of targeting the pushes to applications.
Just for the record, we are trying the following scenarios from the BB end.
a) We have the sample pushCollector, in which I have deliberately overridden the PushService call to specify 7874.
b) I have my own application that I am attempting to listen on a specific port
and from the Server end:
1) We are trying to migrate an old BBOS application that used push - it used RIM push and specifying the device and the port
2) We have some new code that creates a PAP push using the new XML configuration.
The only thing that works is the PAP push (2), and it is always picked up by the sample pushCollector ( a ).
05-28-2013 09:37 AM
I used the same push code that we've been using on BES5:
This is to BES 10.1, but also works against BES 10.0
The request goes as a POST, with the payload in the Post data, as usual.
I haven't retested using a Pap push yet - my main concern was to get pushes out from our existing App Server which has been pushing to BES5 and BB Java OS devices using the RIM-push format.
05-29-2013 09:42 AM
I just wanted to clear up one thing about not having to specify an application ID when you create a PushService instance for BES 10.
You don't have to specify one, because it uses a default one which I mention in the http://supportforums.blackberry.com/t5/BlackBerry-
If you don't specify one, it uses this rule for the application ID:
If you look at the BAR file itself for the app it would be in the META-INF/MANIFEST.MF file.
You basically would take the Package-Name entry and the Package-Id entry and combine them with a period in between.
Application package identifier = Package-Name + "." + Package-Identifier
You would then need to specify this value in your X-Wap-Application-Id header.
Also, 7874 is the browser port. Unfortunately, BES 10 does not support browser push anymore (at least for the time being).
05-29-2013 10:33 AM - edited 05-29-2013 11:06 AM
Thanks for all the input.
We seem to have this working satisfactorily, if not perhaps perfectly.
The Server push code has not changed, we are pushing to the device PIN and the port.
When we create the 'channel' on the client, we open a PushService using:
providerApplicationId - the port that was specified in the push
targetKey - the id from the bar descriptor - appname.invoke.push - see below.
This seems to work well, and provides us with the ability to have multiple applications on device each 'listening' to a different port. We have done some brief testing and it appears that the the first application that grabs the port (providerApplicationId) gets to keep it.
This is working well enough for us. However if it is not a correct approach, I would appreciate a heads up!
Regarding the last post by mdandrea, what this seems to be saying, is that when using PAP push, you can direct a push to an application by specifying the X-Wap-Application-Id, using the naming convention as described.
We had actually tried this, and it didn't seem to work for us. We got nothing through, for either our application or the pushCollector sample, until we changed the providerApplicationId to specify the port. With 7874 specified, we got stuff through.
That said, we seem to have a strange situation now where everything pushed to 7874, and our application port, actually ends up in our application, including PAP pushes. I suspect there is something else going on here that we are not understanding.
When we delete an application, I presume this deletes any registrations that are enabled for pushing?
The bar descriptor contains the following:
05-29-2013 10:41 AM
Something new for BES10, in the "BlackBerry Enterprise Service Development Guide" page 12:
"Note: For RIM push, the application ID can be passed in the PORT parameter."
I think the BES does not check for the application-ID being used on the device, using RIM Push.
Using PAP Push, the BES won't send Push to a device, if the BES doesn't know the application with that Application ID is installed on the device. BES gives error 3012 in this case.
09-01-2013 06:32 PM
Just a note as I near completion of my exhaustive examination of everything that's required for push to work, or prevents it from working, with BIS PAP push and BES10 (both /pap and /push style) pushes...
From everything I can tell, this supposed "port" number that peter_strange and others are describing is not really what I'd call a port number, with BB10.
If you use an empty string app id to initialize the PushService(), it will assign for you the default id built from Package-Name + "." + Package-Id fields in your MANIFEST.MF (which come from the bar-descriptor.xml and your author name).
To match that, you specify the same PORT= value. This has worked here in all cases where I've had all my other ducks in a row.
I've also tried using some other arbitrary string in both places (i.e. explicitly giving my own made-up identifier when initializing PushService() and after PUSH=) and that works just as well.
None of this applies (yet) in my experiments with BES /pap pushes, which mostly don't work at all (and so far only with 10.2, when they do work at all).
In short, I don't think you should think of this as a "port" value of any sort with BES10/BB10, other than to the extent that the query string parameter is named PORT. When you're specifying what looks like an integer port number, it's treated as merely a sequence of characters, the same as any other identifier you could put in.
Not sure if that will help anyone... I'm learning a lot right now that I wish I'd known before, and none of it is documented anywhere, as far as I can tell. Discussions like the above were leading me to the wrong conclusions at one point.