NotificationDefaultApplicationSettings

Since: BlackBerry 10.2.0

#include <bb/platform/NotificationDefaultApplicationSettings>

To link against this class, add the following line to your .pro file: LIBS += -lbbplatform

An application's default notification settings.

This class should ONLY be used to change an application's default notification settings. The new settings can be specified by using the setter methods provided. The new settings will not be applied until apply() is called.

Note:

If an application does not use this class to change its default notification settings, the default settings will be used and cannot be changed.


Overview

Public Functions Index

NotificationDefaultApplicationSettings ()
NotificationDefaultApplicationSettings (const NotificationDefaultApplicationSettings &other)
~NotificationDefaultApplicationSettings ()
bb::platform::NotificationSettingsError::Typeapply ()
bb::platform::NotificationPolicy::Typeled () const
NotificationDefaultApplicationSettings &operator= (const NotificationDefaultApplicationSettings &other)
bb::platform::NotificationPriorityPolicy::Typepreview () const
voidsetLed (bb::platform::NotificationPolicy::Type policy)
voidsetPreview (bb::platform::NotificationPriorityPolicy::Type policy)
voidsetSound (bb::platform::NotificationPolicy::Type policy)
voidsetTonePath (const QUrl &tonePath)
voidsetVibrate (bb::platform::NotificationPolicy::Type policy)
voidsetVibrateCount (int count)
bb::platform::NotificationPolicy::Typesound () const
QUrltonePath () const
bb::platform::NotificationPolicy::Typevibrate () const
intvibrateCount () const

Public Functions

NotificationDefaultApplicationSettings ()

Constructs a new NotificationDefaultApplicationSettings instance.

Since:

BlackBerry 10.2.0

NotificationDefaultApplicationSettings (

Constructs a NotificationDefaultApplicationSettings as a copy of other.

Parameters
other

The NotificationDefaultApplicationSettings to copy from.

Since:

BlackBerry 10.2.0

~NotificationDefaultApplicationSettings ()

Destructor.

Since:

BlackBerry 10.2.0

bb::platform::NotificationSettingsError::Type apply ()

Updates the application's default notification settings.

This method updates the application's default notification settings to those specified by this instance. The new settings will only be applied if the default settings haven't been modified already.

Return:

bb::platform::NotificationSettingsError::None, if the request was successful, or an error code otherwise. See bb::platform::NotificationSettingsError for the list of values.

Since:

BlackBerry 10.2.0

bb::platform::NotificationPolicy::Type led ()

Returns the LED effects policy for the NotificationDefaultApplicationSettings instance.

Return:

bb::platform::NotificationPolicy::Type containing the policy for LED effects.

Since:

BlackBerry 10.2.0

NotificationDefaultApplicationSettings & operator= (

Assigns the value of other to this NotificationDefaultApplicationSettings instance.

Since:

BlackBerry 10.2.0

bb::platform::NotificationPriorityPolicy::Type preview ()

Returns the Instant Preview effects policy for the NotificationDefaultApplicationSettings instance.

Return:

bb::platform::NotificationPriorityPolicy::Type containing the Instant Preview effects policy.

Since:

BlackBerry 10.2.0

void setLed (

Sets the LED effects policy for the NotificationDefaultApplicationSettings instance.

The new policy will not be applied until apply() is called.

Parameters
policy
The new policy for LED effects. Valid policies are:
Since:

BlackBerry 10.2.0

void setPreview (

Sets the Instant Preview effects policy for the NotificationDefaultApplicationSettings instance.

The new policy will not be applied until apply() is called.

Parameters
policy
The new policy for Instant Preview effects. Valid policies are:
Since:

BlackBerry 10.2.0

void setSound (

Sets the sound effects policy for the NotificationDefaultApplicationSettings instance.

The new policy will not be applied until apply() is called.

Parameters
policy
The new policy for sound effects. Valid policies are:
Since:

BlackBerry 10.2.0

void setTonePath (
  • const QUrl &tonePath)

Sets the tone path of the NotificationDefaultApplicationSettings instance.

This setting will not be applied until apply() is called. The tonePath must be specified as a file URI to a public asset or a shared asset on the device. A local asset can be changed to a public asset in the Assets tab of a project's bar-descriptor.xml.

Parameters
tonePath

The new tone path.

Since:

BlackBerry 10.2.0

void setVibrate (

Sets the vibration effects policy for the NotificationDefaultApplicationSettings instance.

The new policy will not be applied until apply() is called.

Parameters
policy
The new policy for vibration effects. Valid policies are:
Since:

BlackBerry 10.2.0

void setVibrateCount (
  • intcount)

Sets the vibrate count of the NotificationDefaultApplicationSettings instance.

The new vibration count will not be applied until apply() is called. The vibrate count is an integer in the range [1,5].

Parameters
count

An integer in the range [1,5]. If the value is outside the valid range it will be clamped to [1,5].

Since:

BlackBerry 10.2.0

bb::platform::NotificationPolicy::Type sound ()

Returns the sound effects policy for the NotificationDefaultApplicationSettings instance.

Return:

bb::platform::NotificationPolicy::Type containing the policy for sound effects.

Since:

BlackBerry 10.2.0

QUrl tonePath ()

Returns the tone path for the NotificationDefaultApplicationSettings instance.

Return:

A QUrl containing the tone path.

Since:

BlackBerry 10.2.0

bb::platform::NotificationPolicy::Type vibrate ()

Returns the vibration effects policy for the NotificationDefaultApplicationSettings instance.

Return:

bb::platform::NotificationPolicy::Type containing the policy for vibration effects.

Since:

BlackBerry 10.2.0

int vibrateCount ()

Returns the vibration count for the NotificationDefaultApplicationSettings instance.

The vibrate count is an integer in the range [1,5].

Return:

An integer in the range [1,5] or -1 if the vibrate count has not been set.

Since:

BlackBerry 10.2.0

Last modified: 2014-06-26



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus