05-26-2014 04:23 AM
for our customer application we implemented push notifications via BES and want to use custom sounds for incoming Notifications. So we succesfully disabled only the sounds in the application settings via the BB GUI. To reach this effect for each application which is distributed via the BES we decided to use NotificationDefaultApplicationSettings in our code. (for testing during the application starts)
gs appSettings; qDebug() << "currentAppSound: " << appSettings.sound(); appSettings.setSound(bb::platform::NotificationPol icy::Deny); qDebug() << "NotificationSettingsError: " << appSettings.apply();
If we want to apply the application settings (apply()-function in NotificationDefaultApplicationSettings) the following message is printed out in the Momentics console (please note the class name).
The return value of the NotificationSettingsError is 3.
When we read various current application settings via NotificationDefaultApplicationSettings (see below) the return value of the NotificationPolicy is 0.
currentAppTonePath: QUrl( "" )
The result of all this is no saving of the changed application setings.
The class NotificationApplicationSettings returns correct values.
We use Momentics 2.0 and the BlackBerry Native SDK 10.2.1.2141.
Thanks for your help.
06-12-2014 05:10 AM
And a further push.
Current workaround is a dialog box during the app start if the application sound is on. So each user must disable the sound manually. The preferred solution is to implement it in the code that each device in the BES has the same settings.