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

Native Development

Reply
New Developer
Posts: 3
Registered: ‎05-26-2014
My Device: Z10, Q10, Q5
My Carrier: Vodafone

get PPS ERROR: "INVALID_VALUE" from apply-function in NotificationDefaultApplicationSettings

Hello Forum,


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)

 

bb::platform::NotificationDefaultApplicationSettings appSettings;
qDebug() << "currentAppSound: " << appSettings.sound();
appSettings.setSound(bb::platform::NotificationPolicy::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).

 

NoitifcaionDefaultApplicationSettings::registerApplicationSettings() PPS ERROR: "INVALID_VALUE"

 

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.

 

currentAppSound: 0
currentAppVibrate: 0
currentAppVibrateCount: -1
currentAppLed: 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.

 

Best regards.

 

Maik

New Developer
Posts: 3
Registered: ‎05-26-2014
My Device: Z10, Q10, Q5
My Carrier: Vodafone

Re: get PPS ERROR: "INVALID_VALUE" from apply-function in NotificationDefaultApplicationSettings

Hi developers,

 

any ideas?

 

Best regards.

Highlighted
New Developer
Posts: 3
Registered: ‎05-26-2014
My Device: Z10, Q10, Q5
My Carrier: Vodafone

Re: get PPS ERROR: "INVALID_VALUE" from apply-function in NotificationDefaultApplicationSettings

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.

 

Best regards.

Maik