public final class

ContactService

extends RcsService
java.lang.Object
   ↳ com.gsma.services.rcs.RcsService
     ↳ com.gsma.services.rcs.contact.ContactService

Class Overview

Contact service offers additional methods to manage RCS info in the local address book. The parameter contact in the API supports the following formats: MSISDN in national or international format, SIP address, SIP-URI or Tel-URI.

Summary

[Expand]
Inherited Constants
From class com.gsma.services.rcs.RcsService
Public Constructors
ContactService(Context ctx, RcsServiceListener listener)
Constructor
Public Methods
void blockContact(ContactId contact)
Block a contact.
final void connect()
Connects to the API
void disconnect()
Disconnects from the API
RcsContact getRcsContact(ContactId contact)
Returns the rcs contact infos from its contact ID (i.e.
Set<RcsContact> getRcsContacts()
Returns the list of RCS contacts
Set<RcsContact> getRcsContactsOnline()
This method is deprecated. Use getRcsContacts() instead.
Set<RcsContact> getRcsContactsSupporting(String serviceId)
This method is deprecated. Use getRcsContacts() instead.
void unblockContact(ContactId contact)
Unblock a contact
[Expand]
Inherited Methods
From class com.gsma.services.rcs.RcsService
From class java.lang.Object

Public Constructors

public ContactService (Context ctx, RcsServiceListener listener)

Since: API Level 1.5

Constructor

Parameters
ctx Application context
listener Service listener

Public Methods

public void blockContact (ContactId contact)

Since: API Level 1.5

Block a contact. Any communication from the given contact will be blocked and redirected to the corresponding spambox.

Parameters
contact Contact ID
Throws
RcsPersistentStorageException
RcsServiceNotAvailableException
RcsGenericException
RcsPersistentStorageException
RcsServiceNotAvailableException

public final void connect ()

Since: API Level 1.5

Connects to the API

public void disconnect ()

Since: API Level 1.5

Disconnects from the API

public RcsContact getRcsContact (ContactId contact)

Since: API Level 1.5

Returns the rcs contact infos from its contact ID (i.e. MSISDN)

Parameters
contact Contact ID
Returns
  • RcsContact
Throws
RcsPersistentStorageException
RcsServiceNotAvailableException
RcsGenericException
RcsGenericException
RcsPersistentStorageException
RcsServiceNotAvailableException
See Also

public Set<RcsContact> getRcsContacts ()

Since: API Level 1.5

Returns the list of RCS contacts

Returns
  • Set<RcsContact> List of contacts
Throws
RcsPersistentStorageException
RcsServiceNotAvailableException
RcsGenericException
RcsGenericException
RcsPersistentStorageException
RcsServiceNotAvailableException
See Also

public Set<RcsContact> getRcsContactsOnline ()

Since: API Level 1.5

This method is deprecated.
Use getRcsContacts() instead.

Returns the list of online contacts (i.e. registered)

Returns
  • Set<RcsContact> List of contacts
Throws
RcsPersistentStorageException
RcsServiceNotAvailableException
RcsGenericException
RcsGenericException
RcsPersistentStorageException
RcsServiceNotAvailableException
See Also

public Set<RcsContact> getRcsContactsSupporting (String serviceId)

Since: API Level 1.5

This method is deprecated.
Use getRcsContacts() instead.

Returns the list of contacts supporting a given extension or service ID

Parameters
serviceId Service ID
Returns
  • Set<RcsContact> List of contacts
Throws
RcsPersistentStorageException
RcsServiceNotAvailableException
RcsGenericException
RcsGenericException
RcsPersistentStorageException
RcsServiceNotAvailableException
See Also

public void unblockContact (ContactId contact)

Since: API Level 1.5

Unblock a contact

Parameters
contact Contact ID
Throws
RcsPersistentStorageException
RcsServiceNotAvailableException
RcsGenericException
RcsPersistentStorageException
RcsServiceNotAvailableException