net.rim.blackberry.api.profiles
Class NotificationRule
java.lang.Object
net.rim.blackberry.api.profiles.NotificationRule
public class NotificationRule
- extends Object
Encapsulates a notification rule for a particular event.
This class contains settings for alerts that will be generated in response to
the event.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 7.1.0
Constructor Summary |
|
NotificationRule()
Constructs a new empty NotificationRule instance. |
|
NotificationRule(int category,
long eventId,
NotificationAlert[] alerts)
Constructs a new NotificationRule instance with the
specified event category, event ID, and alerts. |
ALERT_TYPE_SOUND
public static final int ALERT_TYPE_SOUND
- Indicates a sound alert type.
- See Also:
- Constant Field Values
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 7.1.0
ALERT_TYPE_LED
public static final int ALERT_TYPE_LED
- Indicates an LED alert type.
- See Also:
- Constant Field Values
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 7.1.0
ALERT_TYPE_VIBRATION
public static final int ALERT_TYPE_VIBRATION
- Indicates a vibration alert type.
- See Also:
- Constant Field Values
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 7.1.0
NotificationRule
public NotificationRule()
- Constructs a new empty
NotificationRule
instance.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 7.1.0
NotificationRule
public NotificationRule(int category,
long eventId,
NotificationAlert[] alerts)
- Constructs a new
NotificationRule
instance with the
specified event category, event ID, and alerts.
- Parameters:
category
- The event category. This parameter must be one of the
event constants, in the form CATEGORY_XXX
, that are defined
in the Profiles
class.eventId
- The event ID.alerts
- The alerts for the notification rule.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 7.1.0
getCategory
public int getCategory()
- Returns the event category of the notification rule.
- Returns:
- The event category.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 7.1.0
getEventId
public long getEventId()
- Returns the event ID of the notification rule.
- Returns:
- The event ID.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 7.1.0
getAllAlerts
public NotificationAlert[] getAllAlerts()
- Returns alerts of all types.
- Returns:
- An array of alerts of all types.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 7.1.0
getAlert
public NotificationAlert getAlert(int alertType)
- Returns an alert based on the specified type.
- Parameters:
alertType
- The type of alert to return. This parameter should be
one of the NotificationRule.ALERT_TYPE_VIBRATION
, NotificationRule.ALERT_TYPE_LED
, or
NotificationRule.ALERT_TYPE_SOUND
.
- Returns:
- An alert based on the specified type.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 7.1.0
toString
public String toString()
- Returns a human-readable representation of this notification rule.
- Overrides:
toString
in class Object
- Returns:
- A human-readable representation of this notification rule.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 7.1.0
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal