BB10 : How to change the phone profile in BB 10 using HTML/Javascript

108 Views Asked by At

I searched a lot but did not find the answer, whether it is possible to change the phone profile programmatically in BB OS 10 using HTML5/Java Script?

My requirement is when user receives a call the phone must get silent or device volume changed to lowest or profile changed to mute.

If it is possible in Native BlackBerry using C/C++?

Thanks in Advance.

1

There are 1 best solutions below

1
hanamj On

As far as I know, it can not be done directly through the WebWorks SDK. I don't see any plugins for it in the community APIs in Github.

It looks like it can be done natively though, so you could potentially write a Cordova plugin to expose it in Javascript. The BlackBerry 10 Cordova Plugin Template may be helpful! Note that there's a new permission element that you'll need in order to change it the setting.

More info: https://developer.blackberry.com/native/reference/cascades/bb__platform__notificationglobalsettings.html

Good luck!