If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Contributor
akshan
Posts: 19
Registered: ‎02-19-2014
My Device: Blackberry Q10
My Carrier: Airtel
Accepted Solution

Can we synchronize the permission selected with the BB10 Notifications OS Settings for our Application.

[ Edited ]

Steps:
BB10 Device-->Settings-->Notifications-->Applications-->[your application name]-->All Alerts[Toggle button]

I have a requirement to check whether "All Alerts" permission is granted or not through Settings when application is running.To check if we can synchronize the permission selected with the BB10 Notifications OS Settings for my  Application. How to retrieve in javascript code whether Alerts permission is on/off while application is running.

I tried by adding the blackberry.system feature and tried hasPermission(blackberry.push) also, i cannot identify whether permission is Allow / Deny ..Plz suggest how to get that.

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,556
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Can we synchronize the permission selected with the BB10 Notifications OS Settings for our Application.

[ Edited ]

I'm not seeing a WebWorks API to do this. If I expected it to be anywhere, it would be here:
https://developer.blackberry.com/html5/apis/beta/blackberry.notification.html#jbo1385148829097

But it looks like that API wasn't fully implemented; it may be worth logging a JIRA in the Developer Issue Tracker to get this functionality added.


At the same time, there is this Cascades API which looks to do what you're looking for:
https://developer.blackberry.com/native/reference/cascades/bb__platform__notificationapplicationsett...

Writing a custom extension for this functionality should allow you to access this functionality:
https://github.com/blackberry/WebWorks-Community-APIs/tree/master/BB10-Cordova/Template


At the same time, a colleague is currently working on an extension that should open up a lot of Qt functionality and I believe the above API should be accessible through that extension. It should be released over the coming week or two, so you could wait for that as well.

 

EDIT: Regarding the last point, check out this extension which provides a mechanism to tie into the majority of Qt APIs.

https://github.com/blackberry/WebWorks-Community-APIs/tree/master/BB10-Cordova/QtBridge


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.
Contributor
akshan
Posts: 19
Registered: ‎02-19-2014
My Device: Blackberry Q10
My Carrier: Airtel

Re: Can we synchronize the permission selected with the BB10 Notifications OS Settings for our Application.

It is good to hear above functionality is going to be released over coming week or two.
Please use plain text.
Contributor
akshan
Posts: 19
Registered: ‎02-19-2014
My Device: Blackberry Q10
My Carrier: Airtel

Re: Can we synchronize the permission selected with the BB10 Notifications OS Settings for our Application.

HI oros, is that API released?
Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,556
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Can we synchronize the permission selected with the BB10 Notifications OS Settings for our Application.

Hi there, I edited my previous response with a link here:

https://github.com/blackberry/WebWorks-Community-APIs/tree/master/BB10-Cordova/QtBridge

 

It is an extension that opens up access to, essentially all, Qt APIs which may be able to be leveraged for this purpose. You'll still need to integrate the extension into your application, but it should be less coding than writing a new extension.


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.