net.rim.blackberry.api.profiles
Class Profiles
java.lang.Object
net.rim.blackberry.api.profiles.Profiles
public class Profiles
- extends Object
Represents the main access point to the device and contact profiles.
A device profile represents a generic response for actions that are not
associated with a contact (for example, a phone call from an unknown number).
A contact profile defines response rules for a specific contact. For example,
when a contact profile exists for a contact, then any phone calls that are
received from that contact are subject to the contact profile rules.
This class provides methods for the following:
- Query for device profiles
- Query for contact profile
- Access to event categories
- Access to event descriptions
- 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
CATEGORY_PHONE
public static final int CATEGORY_PHONE
- Represents phone type events, such as an incoming phone call.
- 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
CATEGORY_MESSAGES
public static final int CATEGORY_MESSAGES
- Represents message type events, such as an incoming email message.
- 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
CATEGORY_REMINDERS
public static final int CATEGORY_REMINDERS
- Represents reminder events, such as a calendar event reminder.
- 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
CATEGORY_INSTANT_MESSAGES
public static final int CATEGORY_INSTANT_MESSAGES
- Represents instant message events.
- 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
CATEGORY_OTHER
public static final int CATEGORY_OTHER
- Represents other type of events.
- 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
LOUD_PROFILE_ID
public static final int LOUD_PROFILE_ID
- Specifies the ID for the Loud profile.
- 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
VIBRATE_PROFILE_ID
public static final int VIBRATE_PROFILE_ID
- Specifies the ID for the Vibrate Only profile.
- 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
QUIET_PROFILE_ID
public static final int QUIET_PROFILE_ID
- Specifies the ID for the Quiet profile.
- 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
DEFAULT_PROFILE_ID
public static final int DEFAULT_PROFILE_ID
- Specifies the ID for the Normal (default) profile.
- 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
PHONE_ONLY_PROFILE_ID
public static final int PHONE_ONLY_PROFILE_ID
- Specifies the ID for the Phone Only profile.
- 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
OFF_PROFILE_ID
public static final int OFF_PROFILE_ID
- Specifies the ID for the Off profile.
- 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
MEDIUM_PROFILE_ID
public static final int MEDIUM_PROFILE_ID
- Specifies the ID for the Medium profile.
- 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
CONTACT_ALERT_PROFILE_ID
public static final int CONTACT_ALERT_PROFILE_ID
- Specifies the ID for the Contact Alert profile.
- 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
getDeviceProfiles
public static Profile[] getDeviceProfiles()
- Returns all of the profiles that are registered on the device.
- Returns:
- An array of all of the profiles that are registered on the
device.
- 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
getActiveProfile
public Profile getActiveProfile()
- Returns the active device profile.
- Returns:
- The active device profile.
- 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
getProfileById
public Profile getProfileById(int profileId)
- Returns the profile with the specified profile ID.
Note that profile IDs are hard-coded. The user may change the profile
notifications rules, which may affect the profile response. For example,
the LOUD_PROFILE_ID
constant points to a profile that
initially has a loud sound. However, a user may change the response
values in this profile so that it no longer has a loud sound.
- Parameters:
profileId
- The ID of the profile to return. This parameter must be
one of the XXX_ID
constants, such as
Profiles.LOUD_PROFILE_ID
.
- Returns:
- The profile with the specified ID if one exists, or
null
otherwise. - 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
getContactProfile
public static ContactProfile getContactProfile(Contact contact)
- Returns the profile for the specified contact.
- Parameters:
contact
- The contact to return the profile for. This contact is
obtained by using the PIM API.
- Returns:
- The profile for the specified contact if one exists, or
null
otherwise. - 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
getAllCategories
public static int[] getAllCategories()
- Returns all event categories.
- Returns:
- An array of all event categories.
- 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
getContactCategories
public static int[] getContactCategories()
- Returns the event categories that are applicable to contacts.
- Returns:
- An array of event categories that are applicable to contacts.
- 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
getCategoryName
public static String getCategoryName(int categoryId)
- Returns the name of the event category with the specified ID.
- Parameters:
categoryId
- The ID of the event category to return. This parameter
must be one of the NotificationsConstants
CATEGORY_XXX
constants.
- Returns:
- The name of 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
getEventDescription
public static String getEventDescription(long eventId)
- Returns the description of the specified event.
- Parameters:
eventId
- The ID of the event to return the description of.
- Returns:
- The description of 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
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