02-14-2013 11:09 PM
I have registered with BB push services, got my https://cpXXX.pushapi.eval.blackberry.com (and https://) addresses, I installed the pushCollector sample on my device, but everytime I enter the config values and save, I get the following message:
Configuration was saveed, but was unable to create push session. Error: Push Service could not connet to the push agent.
I am using a .NET push initiator (just sending the push <pap> from my computer in development mode).
What am I missing? Is there something I am missing?? Any help would be greate and I am kinda new to this (although I have been a software developer for 15 years).
Thanks,
Peter
02-15-2013 07:51 AM
Hi Peter,
When was your debug token created? If it was made before December you may want to recreate.
What URL are you using in the pushCollector sample?
Are you testing on a real device? If so, do you have the BlackBerry logo appearing in the title bar of the home screen?
02-15-2013
08:59 AM
- last edited on
02-15-2013
09:01 AM
by
gbeukeboom
Hi gbeukeboom,
My debug token was actually created last night and I was using a real device. I also tested on the simulator and got the same results (just to be sure, I got my debug token from here: https://www.blackberry.com/SignedKeys/codesigning.
I don't see any logos in the home screen.
The message I get as soon as I open the pushCollector (sample app from blackberry) application is 'Error: Push Service could not connect to the push agent'.
All of this information I got from my push registration with Blackberry.
Some other questions/notes...
as for the push service SDK - do I need to use this? I wanted to avoid using Tomcat, because I am not that familiar with this
I am using some .net code to send the push notifcation and it seems to be working correctly (I get status 'OK' from my web request) - so it is sending a push, but it is the client side that is not working.
Are these the only two components I need? (ie do I only need the push service (.NET code) + the client pushcollector? Of course when I get this working I will move my code to a VPS and add a database for registration purposes.
I have another questions... can I collect a push notification when the application is closed so that I can send the notification to the hub when the user doesn't have the app open?
Basically, I am building an app that sends stock information (notification) to the hub when the value reaches a certain threshold, and also send notification when new news items are available.
Your help is much appreciated!
Thanks,
Peter
02-15-2013 09:05 AM
Hi Peter,
I'd like to stay focused on the client side, the push initiator used will have no effect on if the client can receive push messages.
I also edited your last response, please do not post account information publicly, bad things may happen.
What URL do you enter into the pushCollector?
When you debug, what is the error code you receive and what call generates this error?
As for the BlackBerry logo, this would be displayed on the home screen of the device up in the area where network information is shown, and only on the real device I believe (Push cannot be tested on a simulator currently). Could you please verify? If this icon is missing you will not be able to register.
02-15-2013 09:15 AM
02-15-2013 03:40 PM
I just wanted to quickly address a common misconception about our Push Service SDK.
The Push Service SDK 1.2 installer actually now makes it abundently clear. There is absolutely no dependency of the SDK on Apache Tomcat. The installer provides a Tomcat install with our sample Push Initiators deployed to show you an example use of our SDK. You can implement your Push Initiator in any way you want with the SDK.
Also, I'm not sure if you're aware, but there is a useful Developer Guide that comes with the Push Collector sample:
https://developer.blackberry.com/cascades/document
It might help you answer some of your questions you're having about implementing your own push-enabled application on the BlackBerry.
Thanks,
Matt
02-16-2013 06:46 AM
Hi gbeukaboom and mdandrea,
gbeukaboom: to answer your questions:
1.The url that I enter into the push collector is as follows: http://cpxxxx.pushapi.eval.blackberry.com (where xxxx is my 4 digit content provider id).
2. The error message I recieve as soon as I open the push collector demo is "Error: Push Service could not connect to the Push Agent". This same message appears when I attempt to register as well.
3. The error message I recieve as soon as I attempt to 'Save' on the configuration window is: "Configuration was saved, but was unable tp create push session. Error: Push Service could not connect to the Push Agent).
4. I do see the blackberry logo on the home screen (above-right). This is all on a real device.
Also: I have entered a valid Application ID and the mode is Public/BIS.
In the bar.xml file for the project I tried making the <invoke-target-id> for push and open and made the corresponding changes in the PushNotificationService.hpp (INVOKE_TARGET_KEY_PUSH and INVOKE_TARGET_KEY_OPEN). But this didn't fix the problem.
mdandrea: I have read over all of this documentation, but still can't seem to find the resolution to this particular problem.
Looking forward to hearing back!
Thanks,
Peter
02-19-2013 09:30 AM
Hi,
A few more questions for you:
1. Did you modify the bar-descriptor.xml file at all? The _sys_use_consumer_push permission needs to be defined in there.
2. The push agent should always be running on the device, but did you try a device restart just to see if it would help?
3. When you go to Settings > Security and Privacy > Development Mode, what date does it give for the installed debug token?
Thanks,
Matt
02-19-2013 01:22 PM - edited 02-19-2013 01:30 PM
Did you run PushCollector on BlackBerry 10 physical device? I downloaded it and run on BB10 alpha device, it is working properly. I didn't change any source code except adding one parameter because my old push initiator has a mandatory check for "field1". My BB10 qnx sdk version is 10.0.10.261. I didn't input any debug token in the bar description file either. But my push initiator is Java version.
02-19-2013 01:27 PM - edited 02-19-2013 01:29 PM
Have you had a try to make a simple application without push function only to connect with your .net push initiator URL to check whether it can be connected or not?
Or you can also have a try with the Java version Push initiator. If it is working properly, it means that your client application has something wrong.