这个问题已经在这里解决了:http: //supportforums.blackberry.com/t5/Cascades-Development/Push-Notification-in-Blackberry-Hub/mp/2186999/highlight/true#M15290
这是通知的代码,包括从集线器调用
Notification notification;
n.setTitle(tr("Your title"));
n.setBody(tr("your detailed description"));
n.setCategory("vibrate");
InvokeRequest request;
request.setTarget("org.xyz.yourapp.invoke");
request.setMimeType("application/vnd.yourapp");
n.setInvokeRequest(request);
n.notify();
在你的酒吧描述符里面你需要
<!-- Have an invoke entry here for when a notification is clicked on in the BlackBerry Hub -->
<!-- This will cause the application to be opened -->
<invoke-target id="org.xyz.yourapp.invoke">
<type>APPLICATION</type>
<filter>
<action>bb.action.OPEN</action>
<mime-type>application/vnd.yourapp</mime-type>
</filter>
</invoke-target>
并且不要忘记设置权限
<permission>run_when_backgrounded</permission>
<permission>post_notification</permission>