Contact

Since: BlackBerry 10.0.0

#include <bb/platform/bbm/Contact>

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

Represents a contact on the BBM Social Platform.

Provides access to information about a specific BBM contact, such as display name, status, or personal message, as well as the versions of the BBM Social Platform, BBM version and the app that are running on the contact's device. To access this information the application has to have access allowed and the contact list has to been initialized and is valid.


Overview

Public Functions Index

Contact ()
Contact (const Contact &contact)
~Contact ()
QStringapplicationVersion () const
intbbmVersion () const
QStringdisplayName () const
QStringhandle () const
Contact &operator= (const Contact &contact)
QStringpersonalMessage () const
PRIVATE intplatformVersion () const
QStringppId () const
bb::platform::bbm::UserStatus::Typestatus () const
QStringstatusMessage () const

Public Functions

Contact ()

Creates a new Contact object.

Since:

BlackBerry 10.0.0

Contact (

@ brief Copy constructor.

Parameters
contact

The existing Contact object to copy.

Since:

BlackBerry 10.0.0

~Contact ()

Destructor.

Since:

BlackBerry 10.0.0

QString applicationVersion ()

Retrieves the version of your app that is running on a contact's device.

Return:

The version of the app that a contact is running.

Since:

BlackBerry 10.0.0

int bbmVersion ()

Retrieve the version of BBM that is running on a contact's device.

Possible BBM versions are:
  • 0x0100 for BBM version 1.0 on devices running BlackBerry Device Software 5.0 or earlier

  • 0x0200 for BBM version 2.0 on devices running BlackBerry Device Software 5.0 or earlier

  • 0x0201 for BBM version 2.1 on devices running BlackBerry Device Software 5.0 or earlier

  • 0x0202 for BBM version 2.2 on devices running BlackBerry Device Software 5.0 or earlier

  • 0x0205 for BBM version 2.5 on devices running BlackBerry Device Software 5.0 or earlier

  • 0x0206 for BBM version 2.6 on devices running BlackBerry Device Software 5.0 or earlier

  • 0x0600 for BBM version 6.0 on devices running BlackBerry Device Software 5, BlackBerry 6, or BlackBerry 7

  • 0x0601 for BBM version 6.1 on devices running BlackBerry Device Software 5, BlackBerry 6, or BlackBerry 7

  • 0x0700 for BBM version 7.0 on devices running BlackBerry Device Software 5, BlackBerry 6, or BlackBerry 7

  • 0x0a00 for BBM version 10.0 on devices running BlackBerry 10

  • 0x00 for unknown version

Return:

int The version of BBM that is running on the contact's device. If the version is not known, returns 0.

Since:

BlackBerry 10.2.0

QString displayName ()

Retrieves the contact's BBM display name.

Return:

The contact's BBM display name.

Since:

BlackBerry 10.0.0

QString handle ()

Retrieves the contact's handle.

The handle is an identifier for a user on the BBM Social Platform whose device is running BlackBerry 7 or earlier. It is provided for backwards compatibility and should NOT be used as a persistent identifier for a user. Use the ppId instead.

The contact's handle is the same for each instance of BBM (for example, on a BlackBerry smartphone and a BlackBerry tablet).

Return:

The contact's handle.

Since:

BlackBerry 10.0.0

Contact & operator= (

Assignment operator.

Parameters
contact

The existing Contact object to copy.

Return:

The Contact instance.

Since:

BlackBerry 10.0.0

QString personalMessage ()

Retrieves the contact's BBM personal message.

Return:

The contact's BBM personal message.

Since:

BlackBerry 10.0.0

PRIVATE int platformVersion ()

Retrieves the version of the BBM Social Platform that is running on a contact's device.

The possible versions are: 100 - the first release of the BBM Social Platform for BlackBerry
  1. Release date: January, 2013. Also, the first release of the BBM Social Platform for BlackBerry Device Software version 5, BlackBerry 6, and BlackBerry 7. Release date: October, 2011.

120 - release for BlackBerry Device Software version 5, BlackBerry 6, and BlackBerry 7. Release date: November, 2011.

130 - release for BlackBerry Device Software version 5, BlackBerry 6, and BlackBerry 7. Release date: February, 2012.

Return:

The version of the BBM Social Platform that is running on the contact's device.

Since:

BlackBerry 10.0.0

QString ppId ()

Retrieves the contact's ppId.

The contact's ppId is the same across multiple instances of BBM (for example, on a BlackBerry smartphone and a BlackBerry tablet), when the user signs in with the same BlackBerry ID.

Return:

The contact's ppId.

Since:

BlackBerry 10.0.0

bb::platform::bbm::UserStatus::Type status ()

Retrieves the contact's BBM user status.

Return:

The contact's BBM user status.

Since:

BlackBerry 10.0.0

QString statusMessage ()

Retrieves the contact's BBM status message.

Return:

The contact's BBM status message.

Since:

BlackBerry 10.0.0

Last modified: 2014-06-24



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

comments powered by Disqus