Push notification in blackberry 10 cascades -
Push notification in blackberry 10 cascades -
i need force notification in blackberry 10 cascades,if close application means can't able show notification in blackberry hub
here code
button{ notification.body="hai notification testing " notification.notify(); notification { id: notification title: "title" } }
when user closes application means means,i need show notification in blackberry hub how , can send me solutions solve this.?
this question has been solved here : http://supportforums.blackberry.com/t5/cascades-development/push-notification-in-blackberry-hub/m-p/2186999/highlight/true#m15290
here's code notifications including invoke hub
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();
and within bar descriptor need
<!-- have invoke entry here when notification clicked on in blackberry hub --> <!-- cause application 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>
and dont forget set permissions
<permission>run_when_backgrounded</permission> <permission>post_notification</permission>
blackberry-10
Comments
Post a Comment